aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-05-15 03:46:57 +0200
committerTeddy Wing2023-05-15 03:47:12 +0200
commit8960603277032f9681cf4448919f85c4092908b3 (patch)
tree544cb71712360504dd7b8d03e7196ba25bd7b68b
parentf433550d70577895f8e18b31b1fe189c195b226a (diff)
downloadgocapturedrefrace-8960603277032f9681cf4448919f85c4092908b3.tar.bz2
Idea for getting variable declarations instead of assignments
-rw-r--r--gocapturedrefrace.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go
index 3ac8022..f3e2e81 100644
--- a/gocapturedrefrace.go
+++ b/gocapturedrefrace.go
@@ -60,6 +60,7 @@ func checkClosure(pass *analysis.Pass, funcLit *ast.FuncLit) {
// TODO: Build a list of variables created in the closure
assignments := assignmentsInFunc(pass, funcLit)
fmt.Printf("%#v\n", assignments)
+ // TODO: Use ast.GenDecl instead
ast.Inspect(
funcLit,