Applying semantic versioning to Go packages

The semantic versioning definition that we discussed in the previous section left a few questions unanswered. To begin with, what should be the initial version number for a new package? What is more, as an external user of the package, how would we know when the package API has been stable enough for us to use it safely in our code?

There is no better way to answer these questions than with the help of a small example. Let's consider the following code snippet from an as yet unreleased package that deals with weather predictions:

Get Hands-On Software Engineering with Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.