From 05835ead33c5f18dbe0e615a2bd682c788cbed3e Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Mon, 18 Nov 2024 11:36:02 +0700 Subject: [PATCH 1/2] Remove exportloopref linter --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 2e03329..608af6a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,7 +26,6 @@ linters: - errname - errorlint - exhaustive - - exportloopref - fatcontext - gci - ginkgolinter From a98f7a587349b6aa13676b9cbe2fa6b21fc7ecb0 Mon Sep 17 00:00:00 2001 From: Nuruddin Ashr Date: Mon, 18 Nov 2024 11:41:27 +0700 Subject: [PATCH 2/2] Use integer range --- opaque/opaque.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opaque/opaque.go b/opaque/opaque.go index fda0f00..e617c75 100644 --- a/opaque/opaque.go +++ b/opaque/opaque.go @@ -133,7 +133,7 @@ func (r *runner) run(pass *analysis.Pass) (interface{}, error) { typ := pass.TypesInfo.TypeOf(res) switch typ := typ.(type) { case *types.Tuple: - for i := 0; i < typ.Len(); i++ { + for i := range typ.Len() { v := typ.At(i) vTyp := v.Type() retStmtTypes[i][vTyp] = struct{}{}