gen icon indicating copy to clipboard operation
gen copied to clipboard

帮助里增加查看当前版本的选项

Open taobig opened this issue 3 years ago • 2 comments
trafficstars

Describe the feature

帮助里增加查看当前版本的选项,比如-v选项可以查看当前的版本。

Motivation

Related Issues

taobig avatar Jan 07 '22 09:01 taobig

版本号手动写太麻烦也容易忘记更新,我了解一下看看有没有办法在go install的时候引入编译参数吧

tr1v3r avatar Jan 07 '22 09:01 tr1v3r

@riverchu since go 1.18, go命令会将版本控制信息嵌入到二进制文件当中:https://tip.golang.org/doc/go1.18#go-command
然后通过go version -m gentool可以看到打包的时间、hash值等信息。

taobig avatar Jun 27 '22 13:06 taobig