This subsection will present another practical example that will be more advanced than the one presented in varTimes.go. You will see how to find the variable names with a given string length – you can use any string length you want. Additionally, the program will be able to differentiate between global variables and local variables.
The name of the utility is varSize.go and it will be presented in four parts. The first part of varSize.go is as follows:
package main import ( "fmt" "go/ast" "go/parser" "go/token" "os" "strconv" ) var ...