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.

Reply via email to