dongmu5246 2015-10-08 14:17
浏览 439

如何使用go get签出版本?

I have been trying to install a module using go get github.com/xxx/xxx. It used to get installed easily previously, but the maintainers release a new release and it's not working for me anymore. I am looking to know if there is any way I can get the previous release to install? By default it is installing the master branch. Is there any flag where I can put the branch info like go get github.com/xxx/xxx --branch=xxx?

  • 写回答

2条回答 默认 最新

  • doupang9614 2015-10-08 14:56
    关注

    No, you'll need to use an external dependency management tool that can handle branch and version freezes. Then you use it instead of calling go get directly - this changes from tool to tool - and you can freeze versions. A few popular tools:

    1. Godep (I personally use it): https://github.com/tools/godep

    2. Nut https://github.com/jingweno/nut

    3. Gopm https://github.com/gpmgo/gopm

    4. Some libraries use gopkg.in which embeds vesions into the import urls. http://labix.org/gopkg.in This does allow to use go-get directly, but it depends on whether the libraries are released via gopkg

    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算