chore: modernize some code

This commit is contained in:
Vincent Bernat
2025-11-14 23:11:53 +01:00
parent 625387a617
commit abca5e983d
21 changed files with 42 additions and 63 deletions

View File

@@ -223,7 +223,7 @@ func ParametrizedConfigurationUnmarshallerHook[OuterConfiguration any, InnerConf
return from.Interface(), nil
}
configField := to.FieldByName("Config")
fromConfig := reflect.MakeMap(reflect.TypeOf(gin.H{}))
fromConfig := reflect.MakeMap(reflect.TypeFor[gin.H]())
// Find "type" key in map to get input type. Keep existing fields as is.
// Move everything else in "config".