--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0a16b738-59e5-4885-90c8-cd168e308623n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CALWqRZov4r%2BN2FiZug5mmwUwhYcvf08922UQU%3DMqfJKLFT8dBg%40mail.gmail.com.
Oh, except that debug.BuildInfo (unsurprisingly) is only available in debug not release builds. So I guess the answer is that there isn't any nice way to do it.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/885E5726-E0CD-46B2-B572-900A2E87AE07%40kastelo.net.
On 2 Nov 2022, at 09:47, 'Mark' via golang-nuts <golan...@googlegroups.com> wrote:
Oh, except that debug.BuildInfo (unsurprisingly) is only available in debug not release builds. So I guess the answer is that there isn't any nice way to do it.
What do you mean by debug vs release builds? I don't think Go makes that distinction.
That said, the build info will not contain information about your tags and such.
The traditional way to add that is to have a build script inject that using `-ldflags -X ...` to set the value of some variables in the program.
//jb
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/885E5726-E0CD-46B2-B572-900A2E87AE07%40kastelo.net.