Go language is getting increasingly popular when it comes to writing microservices and commmand-line tools. It easily lets you compile a complicated application into a single binary, it can cross-compile from any OS to any other OS the Go compiler supports.
Go compiler has this nice
LDFLAGS trick to assign values to the variables in the
program at the compile time. So if you have a
Version variable in your program
you can compile it as:
$ go build -ldflags "-X ...