coreos/go-semver

semver library in Go

365

stars

78

commits

Go

primary language

Jul 22, 2026

updated

semver.org

README

go-semver - Semantic Versioning Library

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

Contributors

bgilbert

27 commits

marineam

15 commits

philips

7 commits

travier

4 commits

coreos/go-semver

semver library in Go

365

stars

78

commits

Go

primary language

Jul 22, 2026

updated

semver.org

README

go-semver - Semantic Versioning Library

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

Contributors

bgilbert

27 commits

marineam

15 commits

philips

7 commits

travier

4 commits

Languages

Go

100.0%