January 2020
Intermediate to advanced
640 pages
16h 56m
English
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:
package weather // Prediction describes a weather prediction. type Prediction uint8 // The supported weather prediction types. const ( Sunny Prediction = iota Rain Overcast ...