/version-management-example

example of version management of golang

Primary LanguageGo

version-management-example

golang程序版本管理例子

编译

修改脚本中的程序名以及版本号,并使用脚本编译后,相关信息就会写到version的变量中,通过在main函数中打印该信息显示相关信息.

实例

运行编译后的实例,结果如下

./example -v
Version:  0.0.1 
Git commit: de07491 
Go version: go version go1.6.2 linux/amd64 
Build time: 2017-05-11 16:20:27