去安装二进制名称(Go Install Binary name)

编程入门 行业动态 更新时间:2024-10-26 09:23:12
去安装二进制名称(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

更多推荐

本文发布于:2023-07-20 12:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1199633.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:名称   Install   Binary

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!