大家推荐哪种golang包管理方式?

vendor特性肯定要用,否则远端的git库升级可能会导致接口不兼容。

谢谢。

已邀请:

astaxie - 创造、获取、分享、传播和应用Go

赞同来自: itfanr niugou niuniu left2right qiangmzsx

我们目前项目中使用的是godep,但是我最近尝试迁移到glide里面来,两个的功能都差不多,但是glide更强大一点,而且是Go1.5 vendor目录支持之后出来的,所以我还是比较推荐用这个。

这里列出来一些目前支持vendor的工具

九命猫

赞同来自: tanran 有鱼

在用gb

yougg

赞同来自: itfanr navigaid

go get支持git submodule

所以不需要其他的第三方包管理器
直接在vendor目录里面添加依赖的库为submodule就行了

airylinus

赞同来自: itfanr liushuchun

glide 很女子很弓虽大

astaxie - 创造、获取、分享、传播和应用Go

赞同来自: niugou

@kinta, 请看我在本地测试的,你是不是姿势不对,建议先升级到最新版本的glide再试试

glide init
[INFO]  Generating a YAML configuration file and guessing the dependencies
[INFO]  Attempting to import from other package managers (use --skip-import to skip)
[INFO]  Scanning code to look for dependencies
[INFO]  --> Found reference to github.com/astaxie/beego
[INFO]  --> Adding sub-package context to github.com/astaxie/beego
[INFO]  --> Found test reference to github.com/smartystreets/goconvey/convey
[INFO]  Writing configuration file (glide.yaml)
[INFO]  Would you like Glide to help you find ways to improve your glide.yaml configuration?
[INFO]  If you want to revisit this step you can use the config-wizard command at any time.
[INFO]  Yes (Y) or No (N)?
Y
[INFO]  Looking for dependencies to make suggestions on
[INFO]  --> Scanning for dependencies not using version ranges
[INFO]  --> Scanning for dependencies using commit ids
[INFO]  Gathering information on each dependency
[INFO]  --> This may take a moment. Especially on a codebase with many dependencies
[INFO]  --> Gathering release information for dependencies
[INFO]  --> Looking for dependency imports where versions are commit ids
[INFO]  Here are some suggestions...
[INFO]  The package github.com/astaxie/beego appears to have Semantic Version releases (http://semver.org).
[INFO]  The latest release is v1.7.1. You are currently not using a release. Would you like
[INFO]  to use this release? Yes (Y) or No (N)
N
[INFO]  Would you like to remember the previous decision and apply it to future
[INFO]  dependencies? Yes (Y) or No (N)
Y
[INFO]  No proposed changes found. Have a nice day.
cat glide.yaml
package: btest
import:
- package: github.com/astaxie/beego
  subpackages:
  - context
testImport:
- package: github.com/smartystreets/goconvey
  subpackages:
  - convey

chenmin

赞同来自: yuekcc

govendor

googollee

赞同来自:

gopkg,侵入最小。不过这个是给作者准备的,使用者没得选。

xiayf - 程序员,译者,GO、Python、PHP、JS

赞同来自:

godep

kinta

赞同来自:

glide

xieyanke - 职业打杂儿,业余编程……

赞同来自:

glide真的很不错

kinta

赞同来自:

既然这么多人用glide,那问个glide的一个问题: glide init 的时候,我发现会将绝对路径的package路径写入glide.yaml (譬如 Keepin/common 这个路径),这样子glide install就会报错。 有什么参数可以忽略吗?

davidcai1993

赞同来自:

在用 glide ,也解决了 fork 的问题。

safeoy

赞同来自:

glide

CTO

赞同来自:

govendor

tanran

赞同来自:

gb

asdfsx

赞同来自:

期待官方的dep

stirlingx - https://github.com/liyue201

赞同来自:

godep

luw2007

赞同来自:

godep 不拷贝test文件。

mrbdmm

赞同来自:

glide 一枚

tpkeeper - Software Engineer. Gopher. [ tpkeeper.me@gmail.com ]

赞同来自:

glide

suc

赞同来自:

社区 好啊!!

qiangmzsx - 痛而不言,笑而不语,迷而不失,惊而不乱。

赞同来自:

必须glide

simon

赞同来自:

目前都还没用过。。。

topgrd

赞同来自:

dep

Mrwxj - 图样图森破

赞同来自:

dep 最近在使用,感觉不错,毕竟亲生的

asdfsx

赞同来自:

官方貌似又在搞新轮子~~~vgo

要回复问题请先登录注册