标签:value time ack version lang 变量 build main server
http://studygolang.com/articles/2052
ldflags 用法:【路径,非必需,除非你有目录层次】包名.变量
[path]packege.value
go build -ldflags "-X other.VERSION=1.0.0 -X gpxj/other.VERSION=1.0.3 -X main.VERSION=1.0.0 -X ‘main.BUILD_TIME=`date`‘ -X ‘main.GO_VERSION=`go version`‘" -v -o "server-${VERSION}-${COMMIT:0:7}" server.go
标签:value time ack version lang 变量 build main server
原文地址:http://www.cnblogs.com/studyNT/p/6980573.html