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:
Martin Atkins 2017-07-25 18:24:55 -07:00
parent 0598a0b79b
commit 4c269b52e2
1 changed files with 2 additions and 2 deletions

View File

@ -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(),
})