# Functions
Compare returns -1, 0, or +1 depending on whether x < y, x == y, or x > y, interpreted as toolchain versions.
FromToolchain returns the Go version for the named toolchain, derived from the name itself (not by running the toolchain).
IsLang reports whether v denotes the overall Go language version and not a specific release.
IsPrerelease reports whether v denotes a Go prerelease version.
IsToolchain reports whether the module path corresponds to the virtual, non-downloadable module tracking go or toolchain directives in the go.mod file.
IsValid reports whether the version x is valid.
Lang returns the Go language version.
Max returns the maximum of x and y interpreted as toolchain versions, compared using Compare.
ModCompare returns the result of comparing the versions x and y for the module with the given path.
ModIsPrefix reports whether v is a valid version syntax prefix for the module with the given path.
ModIsPrerelease reports whether v is a prerelease version for the module with the given path.
ModIsValid reports whether vers is a valid version syntax for the module with the given path.
ModMajorMinor returns the "major.minor" truncation of the version v, for use as a prefix in "@patch" queries.
ModSort is like module.Sort but understands the "go" and "toolchain" modules and their version ordering.
Prev returns the Go major release immediately preceding v, or v itself if v is the first Go major release (1.0) or not a supported Go version.
ToolchainMax returns the maximum of x and y interpreted as toolchain names, compared using Compare(FromToolchain(x), FromToolchain(y)).
# Structs
A TooNewError explains that a module is too new for this version of Go.
# Interfaces
A Switcher provides the ability to switch to a new toolchain in response to TooNewErrors.