去安装二进制名称(Go Install Binary name)
go build允许使用-o命令行选项获得精确的二进制名称。 go install没有,但是它部署了二进制和缓存包编译。
如何使用go install更改二进制名称? 或使用go build缓存编译?
一个简单的答案是“使用正确的包装名称安装”,但请问,我在哪里缺少选项?
go build allow to precise binary name with the -o command line option. go install doesn't, but it deploy the binary and cache package compilation.
How to either change the binary name with go install? or cache compilation with go build?
A simple answer would be "use go install with correct package name", but please, where is the option I am missing?
最满意答案
你可以使用-i标志来构建:
-i标志安装作为目标依赖项的软件包。
go build -i -o binary packagename
You can use the -i flag to go build:
The -i flag installs the packages that are dependencies of the target.
go build -i -o binary packagename
更多推荐
发布评论