package main import "fmt" var ( version = "develop" otherval = "unset" ) func main() { fmt.Println(version) fmt.Println(otherval) } go build -ldflags="-X main.version=$123 -X main.otherval=abc"