Help us shape the future of Go! Take the 2026 Go Developer Survey

version

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version Application Version
	Version = "2.0.6"
	// Equals p1==p2 in version.Compare(p1, p2)
	Equals = 0
	// Error failure parsing one of the parameters in version.Compare(p1, p2)
	Error = 2
	// Greater p1>p2 in version.Compare(p1, p2)
	Greater = -1
	// Smaller p1<p2 in version.Compare(p1, p2)
	Smaller = 1
)

Variables

This section is empty.

Functions

func Compare

func Compare(left, right string) int

Compare two versions.

* if left < right: return 1 (version.Smaller)

* if left > right: return -1 (version.Greater)

* if left == right: return 0 (version.Equals)

* if unable to parse left or right: return 2 (version.Error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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