Documentation
¶
Overview ¶
Package goversion provides comparison helpers for bare Go language/directive version strings as they appear in go.mod `go` directives and melange `go-version` inputs (e.g., "1.24", "1.24.5", "1.25rc1"). These functions operate on bare version strings without "v" or "go" prefixes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare compares two bare Go directive versions (e.g. "1.24", "1.24.5", "1.25rc1"). It returns -1, 0, or +1. Invalid versions sort below all valid versions; two invalid versions compare equal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.