cmd/go: characters are missed after $ when using command: go build -ldflags "-X main.VarName=go$name" #28426
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.11.1 darwin/amd64
Does this issue reproduce with the latest release?
Yes. the latest release of 1.11.1
What operating system and processor architecture are you using (
go env
)?What did you do?
The code
I try to overwrite the var
VarName
at build time use below commandgo build -ldflags "-X main.VarName=go$name" -x
But the characters behind
$
are missed,See output main output.
var name: go
What did you expect to see?
I expected all characters set to var. the output expected to be
var name: go$name
What did you see instead?
var name: go
The text was updated successfully, but these errors were encountered: