mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-24 00:00:25 -05:00
refactor: use reflect.TypeFor (#7313)
Signed-off-by: wyrapeseed <wyrapeseed@outlook.com>
This commit is contained in:
@@ -665,7 +665,7 @@ func celMatcherJSONMacroExpander(funcName string) parser.MacroExpander {
|
||||
// map literals containing heterogeneous values, in this case string and list
|
||||
// of string.
|
||||
func CELValueToMapStrList(data ref.Val) (map[string][]string, error) {
|
||||
mapStrType := reflect.TypeOf(map[string]any{})
|
||||
mapStrType := reflect.TypeFor[map[string]any]()
|
||||
mapStrRaw, err := data.ConvertToNative(mapStrType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user