Skip to content

Commit 3555dd9

Browse files
author
Jamie Tanna
committed
Lint: Ignore marshalling warning with reflect.Value
pkg/runtime/bindform.go:102:34: SA9005: struct type 'reflect.Value' doesn't have any exported fields, nor custom marshaling (staticcheck) if data, err := json.Marshal(field); err != nil {
1 parent 2e2d717 commit 3555dd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bindform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func MarshalForm(ptr interface{}, encodings map[string]RequestBodyEncoding) (url
9999
tag = strings.Split(tag, ",")[0] // extract the name of the tag
100100
if encoding, ok := encodings[tag]; ok && encoding.ContentType != "" {
101101
if strings.HasPrefix(encoding.ContentType, jsonContentType) {
102-
if data, err := json.Marshal(field); err != nil {
102+
if data, err := json.Marshal(field); err != nil { //nolint:staticcheck
103103
return nil, err
104104
} else {
105105
result[tag] = append(result[tag], string(data))

0 commit comments

Comments
 (0)