diff options
| author | Teddy Wing | 2023-05-16 02:39:25 +0200 |
|---|---|---|
| committer | Teddy Wing | 2023-05-16 02:39:25 +0200 |
| commit | cfb5c2d1a36017eb04cb9f94a3d027fb7616464b (patch) | |
| tree | aa92b6403f38b9ec3db1508eb0304554c1e64997 | |
| parent | 0c4e6256657247cdba61ff0f4c0d33f6471044d3 (diff) | |
| download | gocapturedrefrace-cfb5c2d1a36017eb04cb9f94a3d027fb7616464b.tar.bz2 | |
Add note about getting function Scope
| -rw-r--r-- | gocapturedrefrace.go | 1 |
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 { |
