From cfb5c2d1a36017eb04cb9f94a3d027fb7616464b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 16 May 2023 02:39:25 +0200 Subject: Add note about getting function Scope --- gocapturedrefrace.go | 1 + 1 file changed, 1 insertion(+) 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 { -- cgit v1.2.3