1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-27 11:28:41 +00:00
norman/vendor/github.com/coreos/go-semver
Darren Shepherd 426d985fea Update vendor
2018-10-23 22:48:26 -07:00
..
semver Update vendor 2018-10-23 22:48:26 -07:00
.travis.yml Update vendor 2018-10-23 22:48:26 -07:00
LICENSE Update vendor 2018-10-23 22:48:26 -07:00
README.md Update vendor 2018-10-23 22:48:26 -07:00

go-semver - Semantic Versioning Library

Build Status

go-semver is a semantic versioning library for Go. It lets you parse and compare two semantic version strings.

Usage

vA, err := semver.NewVersion("1.2.3")
vB, err := semver.NewVersion("3.2.1")

fmt.Printf("%s < %s == %t\n", vA, vB, vA.LessThan(*vB))

Example Application

$ go run example.go 1.2.3 3.2.1
1.2.3 < 3.2.1 == true

$ go run example.go 5.2.3 3.2.1
5.2.3 < 3.2.1 == false

TODO

  • Richer comparision operations