aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-05-16 02:39:25 +0200
committerTeddy Wing2023-05-16 02:39:25 +0200
commitcfb5c2d1a36017eb04cb9f94a3d027fb7616464b (patch)
treeaa92b6403f38b9ec3db1508eb0304554c1e64997
parent0c4e6256657247cdba61ff0f4c0d33f6471044d3 (diff)
downloadgocapturedrefrace-cfb5c2d1a36017eb04cb9f94a3d027fb7616464b.tar.bz2
Add note about getting function Scope
-rw-r--r--gocapturedrefrace.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go
index dacae11..f8c328f 100644
--- a/gocapturedrefrace.go
+++ b/gocapturedrefrace.go
@@ -35,6 +35,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
fmt.Printf("%#v\n", goStmt)
+ // TODO: How to get types.Func or {ast,types}.Scope of function literal?
funcIdent, ok := goStmt.Call.Fun.(*ast.Ident)
funcObj := pass.TypesInfo.ObjectOf(funcIdent)
if funcObj != nil {