adjust code for TrySet

This commit is contained in:
daheige 2021-04-21 23:13:50 +08:00
parent 39c42871ae
commit 20d21ff67f

View File

@ -29,6 +29,6 @@ type headerSource map[string][]string
var _ setter = headerSource(nil) var _ setter = headerSource(nil)
func (hs headerSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions) (isSetted bool, err error) { func (hs headerSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions) (bool, error) {
return setByForm(value, field, hs, textproto.CanonicalMIMEHeaderKey(tagValue), opt) return setByForm(value, field, hs, textproto.CanonicalMIMEHeaderKey(tagValue), opt)
} }