Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize code adjust #2700

Merged
merged 9 commits into from
Jun 1, 2021
Prev Previous commit
Next Next commit
adjust code for TrySet
  • Loading branch information
daheige committed Apr 22, 2021
commit 20d21ff67f4ece24fac18b8a62db39443a802a3d
2 changes: 1 addition & 1 deletion binding/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ type headerSource map[string][]string

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)
}