Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/jsondecoder/jsondecoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ var (
ErrUnknownField = errors.New("unknown field in JSON input")
)

// UnmarshalDisallowUnknownFieldsUnmarshal parses the JSON-encoded data
// UnmarshalDisallowUnknownFields parses the JSON-encoded data
// and stores the result in the value pointed to by v like json.Unmarshal,
// but with DisallowUnknownFields() set by default for extra security.
func UnmarshalDisallowUnknownFields(data []byte, v interface{}) error {
func UnmarshalDisallowUnknownFields(data []byte, v any) error {
dec := json.NewDecoder(bytes.NewReader(data))
dec.DisallowUnknownFields()

Expand Down