社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
提供go依赖包的下载工具
官方地址:https://gopm.io
go get -v github.com/gpmgo/gopm
go install github.com/gpmgo/gopm
NAME:
Gopm - Go Package Manager
USAGE:
Gopm [global options] command [command options] [arguments...]
VERSION:
0.8.8.0307 Beta
COMMANDS:
list list all dependencies of current project
gen generate a gopmfile for current Go project
get fetch remote package(s) and dependencies
bin download and link dependencies and build binary
config configure gopm settings
run link dependencies and go run
test link dependencies and go test
build link dependencies and go build
install link dependencies and go install
clean clean all temporary files
update check and update gopm resources including itself
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--noterm, -n disable color output
--strict, -s strict mode
--debug, -d debug mode
--help, -h show help
--version, -v print the version
使用gopm get代替go get 其他参数和go get差不多,可以参考上面的参数说明
gopm get -g golang.org/x/sys
可以在GOPATH下看到我们下载到了 golang.org/x/sys 这个包,正常国内用go get是无法下载到该依赖包的,而gopm get却可以
不采用-g参数,会把依赖包下载.vendor目录下面;
采用-g 参数,会把依赖包下载到GOPATH目录中(建议使用);
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!