From 92e60a577767a0e7978f42bc61bb66dd47e44567 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 21 Sep 2020 22:37:07 +0800 Subject: [PATCH] use options instead of opts in error message --- core/mapping/unmarshaler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index 0952f5ab..a3d0d614 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -345,7 +345,7 @@ func (u *Unmarshaler) processNamedFieldWithValue(field reflect.StructField, valu options := opts.options() if len(options) > 0 { if !stringx.Contains(options, mapValue.(string)) { - return fmt.Errorf(`error: value "%s" for field "%s" is not defined in opts "%v"`, + return fmt.Errorf(`error: value "%s" for field "%s" is not defined in options "%v"`, mapValue, key, options) } }