Using -ldflags -X, is there a way to set the internal value as the output of an executable console file?
I've seen examples like this: "-X main.githash=`git rev-parse HEAD`" (which would put the result of the git command w/ flags into it) however, I just can't get it to work (if it's even possible). The file I use is called setVersion.exe and does all the formatting, etc. for me (which includes connecting to a ntp atomic time server for the time stamp, etc.). What I'm using is (setVersion being included in the PATH environment): go build -ldflags "-X 'main.versionBuild=setVersion'" I've tried putting the quotations in different places, etc. Nothing I try is working. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.