I'm new in Golang, and I'm trying to develop a go-module and share it with my colleagues while I'm developing it; In JVM/sbt I used to publish my work with a 'SNAPSHOT' postfixed to version value. but How I can achieve the same in with go-modules?
Versions for modules are tagged by using repo tags (e.g. git tag
), following semantic versioning (https://semver.org/).
So, any version starting with v0
is treated as unstable and may make breaking changes at any time. Once you release a v1
, you cannot make any breaking changes without bumping your major version, which also means you change your module name.
You also have the option of appending +foo
to the end of your version to indicate additional information about the version.
I wrote https://blog.golang.org/using-go-modules as an overview of how to get started using modules.