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: Support absolute import paths for main packages with -X #13676
What version of Go are you using (go version)?
What operating system and processor architecture are you using?
What did you do?
$ go get -ldflags="-X github.com/tsenart/hello.Version=v0.0.1" github.com/tsenart/hello $ hello
What did you expect to see?
What did you see instead?
The context where this would be useful is when compiling many main packages with