directlive: rename walk variable flagged by the reference scan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+3
−3
internal/directlive/subscription.go+3 −3
CI passed — run details
diff --git a/internal/directlive/subscription.go b/internal/directlive/subscription.go| index 6a5c6877..80efaa9e 100644 |
| --- a/internal/directlive/subscription.go |
| +++ b/internal/directlive/subscription.go |
| @@ -41,9 +41,9 @@ func currencyCapSignal(raw json.RawMessage) bool { |
| } |
| var walk func(any) bool |
| walk = func(v any) bool { |
| - switch node := v.(type) { |
| + switch item := v.(type) { |
| case map[string]any: |
| - for key, child := range node { |
| + for key, child := range item { |
| k := strings.ToLower(strings.NewReplacer("_", "", "-", "").Replace(key)) |
| if k == "currency" || k == "currencycap" || k == "currencylimit" || k == "maxcurrency" || k == "maxbudgetusd" || k == "budgetusd" || k == "costcap" || k == "costlimit" || k == "maxcost" { |
| return true |
| @@ -56,7 +56,7 @@ func currencyCapSignal(raw json.RawMessage) bool { |
| } |
| } |
| case []any: |
| - for _, child := range node { |
| + for _, child := range item { |
| if walk(child) { |
| return true |
| } |