All Projects → coreos → Go Semver

coreos / Go Semver

Licence: apache-2.0
semver library in Go

Programming Languages

go
31211 projects - #10 most used programming language

go-semver - Semantic Versioning Library

Build Status GoDoc

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

Usage

vA := semver.New("1.2.3")
vB := semver.New("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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].