Semantic versioning

Semantic versioning [11] is a widely popular system for describing software versions in a way that makes it quite straightforward for the intended software users to figure out which versions are safe to upgrade to and which versions contain breaking API changes and therefore require development effort and time when upgrading.

Semantic versions are formatted as follows:

MAJOR.MINOR.PATCH

Depending on the use case, additional suffixes may be optionally appended to indicate a prerelease (for example, alpha, beta, or RC (or release candidate)) or to convey other build-related information (for example, the Git SHA for the branch that is used to build a release or perhaps a timestamp for when the build artifacts were generated).

When working with Go packages, the three-component approach employed by semantic versioning makes it easy for package authors to let users of the package know what type of changes each release contains. For example, the PATCH field is incremented whenever a backward-compatible bug fix is applied to the code. Conversely, the MINOR field is incremented when new functionality gets added to a package, but, most importantly, only when this new functionality is added in a manner that ensures that the new version remains backward compatible with older package versions. Of course, as packages evolve over time, it is inevitable that at some point some breaking changes will have to be introduced. For instance, an existing function signature may need to be changed to support additional use cases. For those kinds of scenarios, the MAJOR component of the version string will need to be incremented.