https://github.com/Masterminds/glide
document:http://glide.readthedocs.io/en/stable/?badge=stable
golang环境设置设置环境变量 使用vendor目录GO15vendOREXPERIMENT=1安装
获取$ go get github.com/Masterminds/glIDe进入目录$ cd github.com/Masterminds/glIDe编译$ make build$ go build -o glIDe -ldflags "-X main.version=v0.11.0" glIDe.go使用
# 创建glIDe.yaml文件 提示选择N(选择Y 是重新配置文件需手动指定)$ glIDe create#打开配置文件$ open glIDe.yaml #使用glIDe获取包会自动写入glIDe.yaml文件中$ glIDe get github.com/Masterminds/cookoo# 安装glIDe.yaml所需的包$ glIDe install# 项目编译$ go build# glIDe更新包$ glIDe up*注意
可以指定下载包的地址,版本号,下载方式
例如(golang包需要指定下载地址):
- package: golang.org/x/net/contextrepo: git@github.com:golang/net.gitvcs: git
上述的编写方式用空格做缩进,所有key对齐。
完整的配置文件格式package: github.com/Masterminds/glIDehomepage: https://masterminds.github.io/glIDelicense: MITowners:- name: Matt Butcheremail: technosophos@gmail.comhomepage: http://technosophos.com- name: Matt Farinaemail: matt@mattfarina.comhomepage: https://www.mattfarina.comignore:- appengineexcludeDirs:- node_modulesimport:- package: gopkg.in/yaml.v2- package: github.com/Masterminds/vcsversion: ^1.2.0repo: git@github.com:Masterminds/vcsvcs: git- package: github.com/codegangsta/cli- package: github.com/Masterminds/semverversion: ^1.0.0testimport:- package: github.com/arschles/assert版本号指定(version字段)
=: equal (aliased to no operator)!=: not equal>: greater than<: less than>=: greater than or equal to<=: less than or equal to1.2 - 1.4.5 which is equivalent to >= 1.2,<= 1.4.52.3.4 - 4.5 which is equivalent to >= 2.3.4,<= 4.51.2.x is equivalent to >= 1.2.0,< 1.3.0>= 1.2.x is equivalent to >= 1.2.0<= 2.x is equivalent to < 3* is equivalent to >= 0.0.0~1.2.3 is equivalent to >= 1.2.3,< 1.3.0~1 is equivalent to >= 1,< 2~2.3 is equivalent to >= 2.3,< 2.4~1.2.x is equivalent to >= 1.2.0,< 1.3.0~1.x is equivalent to >= 1,< 2^1.2.3 is equivalent to >= 1.2.3,< 2.0.0^1.2.x is equivalent to >= 1.2.0,< 2.0.0^2.3 is equivalent to >= 2.3,< 3^2.x is equivalent to >= 2.0.0,< 3
'*'指定版本报错,需要用'*'指定的可以不填写
总结以上是内存溢出为你收集整理的glide使用全部内容,希望文章能够帮你解决glide使用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)