From 3f4577373527c267df3c89eb4bdaa37480f50cd1 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 15 May 2023 03:10:08 +0200 Subject: Idea for building a list of variable assignments --- gocapturedrefrace.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go index 454156f..11f2ac1 100644 --- a/gocapturedrefrace.go +++ b/gocapturedrefrace.go @@ -57,6 +57,8 @@ func checkClosure(pass *analysis.Pass, funcLit *ast.FuncLit) { } fmt.Printf("%#v\n", formalParams) + // TODO: Build a list of variables created in the closure + ast.Inspect( funcLit, func(node ast.Node) bool { -- cgit v1.2.3