Skip to content

Commit

Permalink
feat: not process if the key of the input map is an empty string (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujian-bytedance authored Feb 28, 2025
1 parent 0c67028 commit eea444f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devops/internal/model/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ func unmarshalMapInput(b []byte, rt reflect.Type) (val reflect.Value, err error)

mapIns := reflect.MakeMap(rt)
for key, raw := range rawMsg {
if key == "" {
continue
}

fieldVal, err := UnmarshalJson(raw, rt.Elem())
if err != nil {
return val, err
Expand Down

0 comments on commit eea444f

Please sign in to comment.