Golang: Using linker flags

I am using -ldflags to set a version variable at build time. I couldn’t find the right package name to use, but this answer helped:

https://stackoverflow.com/questions/47509272/how-to-set-package-variable-using-ldflags-x-in-golang-build

I used this command to find the right name:

go tool nm <your binary> | grep <your variable>