golang compile with injected variable

Shell
go build -ldflags "-X main.InternalVarName=$BASH_VAR_NAME"
Source

Also in Shell: