goversion Install: go get github.com/ryandeng/goversion Use Go linker to make application has -version, the version can be set in compile cmd. For usage see example/main.go