From 3e2c455312e3558f6793b6f526c37820e8fe2afd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 18 May 2023 04:42:42 +0200 Subject: findLocalVarDeclarations: Remove unused `pass` argument I though I might need it when I first wrote the function. --- gocapturedrefrace.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go index 6e5a9d0..1404f78 100644 --- a/gocapturedrefrace.go +++ b/gocapturedrefrace.go @@ -86,7 +86,7 @@ func checkClosure(pass *analysis.Pass, funcLit *ast.FuncLit) { // Build a list of assignments local to funcLit. These will be ignored as // shadowed variables. - localVarDeclarations := findLocalVarDeclarations(pass, funcLit) + localVarDeclarations := findLocalVarDeclarations(funcLit) ast.Inspect( funcLit, @@ -144,7 +144,6 @@ func checkClosure(pass *analysis.Pass, funcLit *ast.FuncLit) { // findLocalVarDeclarations returns a list of all variable declarations in // funcLit. func findLocalVarDeclarations( - pass *analysis.Pass, funcLit *ast.FuncLit, ) (declarations []*ast.Ident) { declarations = []*ast.Ident{} -- cgit v1.2.3