doushi7394 2016-09-29 03:13
浏览 3368
已采纳

如何通过使用go get获取指定版本的软件包(标签)?

How to get the specified version(tag) of package by using go get?

go get github.com/owner/repo

In the above command, how to specify version or tag of the package.

  • 写回答

1条回答 默认 最新

  • dongne1560 2016-09-29 11:53
    关注

    Volker's correct, but here's a way to use a particular version in your project:

    go get github.com/sirupsen/logrus
    cd $GOPATH/src/github.com/sirupsen/logrus
    git checkout v0.9.0
    cd $GOPATH/src/github.com/YOU/PROJECT
    govendor add github.com/sirupsen/logrus  # or similar
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?