无法使用 godeps 更新依赖包

Cannot update dependency package with godeps

我需要更新 stripe-go 库版本。 项目有 19.** 新版本 52.** 有一个 godeps 依赖管理器

当我尝试 运行

godep save github.com/stripe/stripe-go

我明白了

godep: cannot save github.com/stripe/stripe-go/form at revision f8b095462d541c43d981d28de52b7464b25f3ee1: already have github.com/stripe/stripe-go at revision 87c04229ff0262e4e7dfc8af7dc97a471e955ba2.

Run `godep update github.com/stripe/stripe-go' first.

当我 运行

godep update github.com/stripe/stripe-go

我明白了

godep: no packages can be updated

我做错了什么?

我记得这个问题,引用自https://github.com/tools/godep/issues/164#issuecomment-101345584

This seems to be caused by this line here: https://github.com/tools/godep/blob/master/update.go#L205

If packages A and B are under the same root, and I try to only update B, the root will be marked for skipping update because A isn't being updated. I'm not sure what the motivation for this feature is, it seems that developers should be able to selectively update sub packages as they desire.

For what it's worth, I fixed my problem by globbing from the root in my godep update command (e.g. godep update github.com/foo/bar/... instead of github.com/foo/bar/pkg/B. A helpful error message would have gone a long way

当你在这里时,go 1.11 及更高版本具有内置模块支持。也许考虑转向那个? https://github.com/golang/go/wiki/Modules