Hacker News new | ask | show | jobs
by 501 4761 days ago
I (a go noob) somehow got the impression that you're supposed to version your API when writing go libraries. ie, your library should be github.com/501/foo/v1 rather than github.com/501/foo. Can any go users comment on whether that's expected practice?
3 comments

You can if you want, and some folk do, but that's really outside the scope of the language itself and much more about your project management, revision control, and so on.
The easiest way is just to keep your master always in a stable, clean state. Tools like git flow help with that.

Besides that, people who criticize go get's behaviour of checking out the latest revision resp. the go1 or go1.1 tag (if available) seem to forget that you're always free to populate your $GOPATH the way you like. You don't need go get for that.

I suspect you got this erroneous impression due branches based on the version of Go they are compatible with.

Many projects maintain branches named for the Go version they are compatibile with, and the 'go get' tool automatically fetches the appropriate branch.

Actually I think I may have first picked it up from this vclock library: http://labix.org/vclock