How to checkout a release with 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?

  • Let git / go get use proxy domains
  • How to deploy my webapp on CI build success via SSH?
  • Should I commit Godeps/_workspace or is Godeps.json enough?
  • How to get Heroku to detect GO buildpack
  • Managing Go dependencies on git
  • Revel app doesn´t compile in heroku
  • Deploy and build my go app on my server
  • Go get workflow for forked repo
  • 2 Solutions collect form web for “How to checkout a release with go get?”

    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

    You can fork the library and decide if you want to pull new versions to your fork. And roll back if the new version break you application.

    Git Baby is a git and github fan, let's start git clone.