donglu9445 2019-01-26 06:56
浏览 53
已采纳

无法使用Godeps更新依赖包

I need to update stripe-go library version. Project has 19.** New version 52.** There is a godeps dependency manager

When I try to run

godep save github.com/stripe/stripe-go

I get

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.

And when I run

godep update github.com/stripe/stripe-go

I get

godep: no packages can be updated

What do I do wrong?

  • 写回答

1条回答 默认 最新

  • doujing3896 2019-01-26 10:19
    关注

    I remember this issue, quoting from 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

    While you're here, go 1.11 and above has inbuilt module support. Maybe look into shifting into that? https://github.com/golang/go/wiki/Modules

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部