SemVer

About
SemVer is a Go package that provides functions to create version numbers as defined on http://semver.org. SemVer is published on https://github.com/vbsw/semver and https://gitlab.com/vbsw/semver.
Copyright
Copyright 2016, Vitali Baumtrok (vbsw@mailbox.org).
SemVer is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
SemVer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.
Example
Source:
package main
import (
"fmt"
"github.com/vbsw/semver"
)
var version semver.Version
func Version() {
if version == nil {
version = semver.New(1,0,2)
}
return version
}
func main() {
fmt.Println("Version:", Version())
}
Output:
Version: 1.0.2
Using Go
Get this project:
$ go get github.com/vbsw/semver
Update a local copy:
$ go get -u github.com/vbsw/semver
Compile:
$ go install github.com/vbsw/semver
Run tests:
$ go test github.com/vbsw/semver
Using Git
Get the master branch and all refs of this project:
$ git clone https://github.com/vbsw/semver.git
See all tags:
$ git tag -l
See local and remote branches:
$ git branch -a
Checkout other branches than master, for example the development branch:
$ git branch development origin/development
$ git checkout development
See tracked remote branches:
$ git branch -vv
Update all tracked branches and all refs:
$ git fetch
References