Skip to content

Commit

Permalink
Fix semgrep issue with dgryski Go ruleset (#3719)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitris authored Jun 11, 2024
1 parent 1979036 commit a812221
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions util/jsonutil/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ func init() {
// Fields of type json.RawMessage are merged rather than replaced.
func MergeClone(v any, data json.RawMessage) error {
err := jsonConfigMergeClone.Unmarshal(data, v)
if err != nil {
return &errortypes.FailedToUnmarshal{
Message: tryExtractErrorMessage(err),
}
if err == nil {
return nil
}
return &errortypes.FailedToUnmarshal{
Message: tryExtractErrorMessage(err),
}
return err
}

type mergeCloneExtension struct {
Expand Down

0 comments on commit a812221

Please sign in to comment.