package
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Jan 14, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package version provides semantic version parsing and manipulation.
IsGreater returns true if version a is greater than version b.
type Version struct {
Major int
Minor int
Patch int
}
Version represents a semantic version.
Parse parses a semantic version string.
Bump returns a new version with the specified component bumped.
Compare compares two versions.
Returns -1 if v < other, 0 if v == other, 1 if v > other.
String returns the version as a string.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.