From 57587ed18e3908931b4f7bfd73078c47082fb742 Mon Sep 17 00:00:00 2001 From: wyrapeseed Date: Wed, 22 Oct 2025 03:26:30 +0800 Subject: [PATCH] refactor: use reflect.TypeFor (#7313) Signed-off-by: wyrapeseed --- modules/caddyhttp/celmatcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go index 3d118ea79..66a60b817 100644 --- a/modules/caddyhttp/celmatcher.go +++ b/modules/caddyhttp/celmatcher.go @@ -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