英文:
how to check 'go get <package>' installation status?
问题
go get
命令有没有选项可以告诉我它是否真的做了什么?
例如,如果包 X 已经安装了,我想知道 go get X
没有执行任何下载/安装操作。
英文:
Is there any option for go get
that can tell me whether it actually did anything?
For example, if the package X was already installed, I would like to know that go get X
didn't perform any downloading/installation.
答案1
得分: 4
使用 go get -v
命令。
下面是一个示例,展示了使用和不使用 go get
命令的区别:
$ go get -v github.com/peak6/envflag
github.com/peak6/envflag (下载) # 下载包
github.com/peak6/envflag # 构建包(我认为)
$ go get -v github.com/peak6/envflag
$ # 无需操作
英文:
Use go get -v
Here's an example of get doing something vs not:
$ go get -v github.com/peak6/envflag
github.com/peak6/envflag (download) # downloaded package
github.com/peak6/envflag # built package (I think)
$ go get -v github.com/peak6/envflag
$ # nothing to do
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论