We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d236a1e commit 8d46542Copy full SHA for 8d46542
1 file changed
internal/jsondecoder/jsondecoder.go
@@ -12,10 +12,10 @@ var (
12
ErrUnknownField = errors.New("unknown field in JSON input")
13
)
14
15
-// UnmarshalDisallowUnknownFieldsUnmarshal parses the JSON-encoded data
+// UnmarshalDisallowUnknownFields parses the JSON-encoded data
16
// and stores the result in the value pointed to by v like json.Unmarshal,
17
// but with DisallowUnknownFields() set by default for extra security.
18
-func UnmarshalDisallowUnknownFields(data []byte, v interface{}) error {
+func UnmarshalDisallowUnknownFields(data []byte, v any) error {
19
dec := json.NewDecoder(bytes.NewReader(data))
20
dec.DisallowUnknownFields()
21
0 commit comments