version

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version Application Version
	Version = "1.6.1"
	// 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