Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: -X not applied if target is the result of a function call #29897
What version of Go are you using (
The docs (https://golang.org/cmd/link) say "This is only effective if the variable is declared in the source code either uninitialized or initialized to a constant string expression. -X will not work if the initializer makes a function call or refers to other variables." So while this is unfortunate it's a known and documented limitation.