gozcl: fix redundant error message in DecodeExpression
The convert errors already contain the string "incorrect type", so it's redundant to add that as a further prefix here.
This commit is contained in:
parent
0598a0b79b
commit
4c269b52e2
@ -266,7 +266,7 @@ func DecodeExpression(expr zcl.Expression, ctx *zcl.EvalContext, val interface{}
|
||||
diags = append(diags, &zcl.Diagnostic{
|
||||
Severity: zcl.DiagError,
|
||||
Summary: "Unsuitable value type",
|
||||
Detail: fmt.Sprintf("Incorrect value type: %s", err.Error()),
|
||||
Detail: fmt.Sprintf("Unsuitable value: %s", err.Error()),
|
||||
Subject: expr.StartRange().Ptr(),
|
||||
Context: expr.Range().Ptr(),
|
||||
})
|
||||
@ -278,7 +278,7 @@ func DecodeExpression(expr zcl.Expression, ctx *zcl.EvalContext, val interface{}
|
||||
diags = append(diags, &zcl.Diagnostic{
|
||||
Severity: zcl.DiagError,
|
||||
Summary: "Unsuitable value type",
|
||||
Detail: fmt.Sprintf("Incorrect value type: %s", err.Error()),
|
||||
Detail: fmt.Sprintf("Unsuitable value: %s", err.Error()),
|
||||
Subject: expr.StartRange().Ptr(),
|
||||
Context: expr.Range().Ptr(),
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user