Skip to content

Commit 9c06e5c

Browse files
authored
[scrubber] unwarp key if it's an interface (#20374)
1 parent 2b1f20e commit 9c06e5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/scrubber/scrubber.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ func (s *structScrubber) MapElem(m reflect.Value, k reflect.Value, v reflect.Val
544544
v = v.Elem()
545545
kind = v.Kind()
546546
}
547+
if k.Kind() == reflect.Interface {
548+
k = k.Elem()
549+
}
547550
if kind == reflect.String {
548551
m.SetMapIndex(k, reflect.ValueOf(s.Parent.KeyValue(k.String(), v.String())))
549552
}

0 commit comments

Comments
 (0)