go get

Usage:

go get [-d] [-t] [-u] [-v] [-insecure] [build flags] [packages]

Note that package patterns are allowed and are expanded after resolving the module versions. For example, ‘go get golang.org/x/perf/cmd/…’ adds the latest golang.org/x/perf and then installs the commands in that latest version.
可以用…扩展,表示当前目录下的所有package

features

-d: 下载源码和依赖,但是不要build或者install
-t:下载测试依赖。一般下载依赖的时候是不必考虑_test.go中的依赖的
-u:在满足版本语义的前提下更新依赖
When the -t and -u flags are used together, get will update test dependencies as well.

-insecure: flag permits fetching from repositories and resolving custom domains using insecure schemes such as HTTP.

发布了96 篇原创文章 · 获赞 0 · 访问量 1007

猜你喜欢

转载自blog.csdn.net/weixin_45594127/article/details/103871545
今日推荐