1. 安装
go get -u -v github.com/kardianos/govendor
- 使用
#进入到项目目录 cd /home/gopath/src/mytool #初始化vendor目录 govendor init #查看vendor目录 [root@CC54425A mytool]# ls commands main.go vendor mytool_test.sh #将GOPATH中本工程使用到的依赖包自动移动到vendor目录中 #说明:如果本地GOPATH没有依赖包,先go get相应的依赖包 govendor add +external 或使用缩写: govendor add +e #Go 1.6以上版本默认开启 GO 15VENDOREXPERIMENT 环境变量,可忽略该步骤。 #通过设置环境变量 GO15VENDOREXPERIMENT=1 使用vendor文件夹构建文件。 #可以选择 export GO15VENDOREXPERIMENT=1 或 GO15VENDOREXPERIMENT=1 go build 执行编译 export GO15VENDOREXPERIMENT=1
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Art of Computer Programming, Volume 4, Fascicle 3
Donald E. Knuth / Addison-Wesley Professional / 2005-08-05 / USD 19.99
Finally, after a wait of more than thirty-five years, the first part of Volume 4 is at last ready for publication. Check out the boxed set that brings together Volumes 1 - 4A in one elegant case, and ......一起来看看 《The Art of Computer Programming, Volume 4, Fascicle 3》 这本书的介绍吧!