From fc5e0ec8776497c84c7417ebecfa4ff79881ac4c Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 10 Apr 2026 22:18:18 +0800 Subject: [PATCH] Add missing `//nolint:depguard` (#37162) (#37170) Backport #37162 by @silverwind When running `golangci-lint` without `GOEXPERIMENT=jsonv2`, a lint error `import 'encoding/json' is not allowed` is seen. All other files in the module that import `encodings/json` have `//nolint` already, so add it. --- This PR was written with the help of Claude Opus 4.6 Co-authored-by: silverwind Co-authored-by: Claude (Opus 4.6) --- modules/json/jsonlegacy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/json/jsonlegacy.go b/modules/json/jsonlegacy.go index 83eabad452..99875b96f1 100644 --- a/modules/json/jsonlegacy.go +++ b/modules/json/jsonlegacy.go @@ -6,7 +6,7 @@ package json import ( - "encoding/json" + "encoding/json" //nolint:depguard // this package wraps it "io" )