go-semver

command module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Semantic Versions http://semver.org
Semantic Versions http://semver.org

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL