Refactor to use reflect.TypeFor
This commit is contained in:
parent
50f95dd909
commit
86422af988
5 changed files with 6 additions and 6 deletions
|
|
@ -47,7 +47,7 @@ func encodeRawValue(labels map[string]string, root string, rawValue interface{})
|
|||
|
||||
if tValue.Kind() == reflect.Map && tValue.Elem().Kind() == reflect.Interface {
|
||||
r := reflect.ValueOf(rawValue).
|
||||
Convert(reflect.TypeOf((map[string]interface{})(nil))).
|
||||
Convert(reflect.TypeFor[map[string]interface{}]()).
|
||||
Interface().(map[string]interface{})
|
||||
|
||||
for k, v := range r {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue