2

有一个 关于 go get 命令的问题

 2 years ago
source link: https://www.v2ex.com/t/821039
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

有一个 关于 go get 命令的问题

V2EX  ›  Go 编程语言

有一个 关于 go get 命令的问题

  Joker123456789 · 22 小时 56 分钟前 · 680 次点击

如果 我就写这么一句:

go get github.com/xx/xxx

他下载的是哪个分支,哪个 tag ?

如果想下载 指定的 tag ,应该怎么写?

5 条回复    2021-12-09 11:19:35 +08:00

Vegetable

Vegetable      22 小时 53 分钟前

默认应该是最新的 tag 、默认分支。指定的话 go get <path-to-repo>@<branch>
branch 也可以是 hash

Reid

Reid      22 小时 7 分钟前

最新版本不是不建议使用 go get 用 Go install 吗

cxsz

cxsz      21 小时 43 分钟前

@Reid 对滴,官方是这么建议的,不过一般用 ide 自动下载包,就不考虑这么多了

关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   2838 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 26ms · UTC 01:03 · PVG 09:03 · LAX 17:03 · JFK 20:03
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK