I have no idea how ldflags works under the hood but this is awesome news. I ll check the other Q later. Hoped someone could answer without having to roll out a test, from his mind.
thanks for interest and answer! On Wednesday, September 28, 2016 at 3:05:07 PM UTC+2, parais...@gmail.com wrote: > > I just tested with : > > package main > > // SomeVar is a var > > var SomeVar = "default" + "variable" > > func main() { > print(SomeVar) > } > > and > > go build --ldflags "-X main.SomeVar=changed" > > > and it works, it prints changed > > Le mardi 27 septembre 2016 23:28:49 UTC+2, mhh...@gmail.com a écrit : >> >> What if for some reason i have to write the value like this within the >> code (...), >> >> var SomeVariable = "some"+"what" >> >> ldflags will be able to operate ? >> > -- 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.