aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gocapturedrefrace.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/gocapturedrefrace.go b/gocapturedrefrace.go
index 0ca4af7..d88989e 100644
--- a/gocapturedrefrace.go
+++ b/gocapturedrefrace.go
@@ -160,6 +160,12 @@ func assignmentsInFunc(
fmt.Printf("assignment: %v\n", assignment.Tok)
}
+ if pass.TypesInfo.Defs[ident] != nil {
+ fmt.Println("DEFINE:", ident)
+ } else {
+ fmt.Println("ASSIGN:", ident)
+ }
+
assignments = append(assignments, ident.Name)
return true