Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare returns -1, 0, or +1 depending on whether x < y, x == y, or x > y, interpreted as Go versions. The versions x and y must begin with a "go" prefix: "go1.21" not "1.21". Invalid versions, including the empty string, compare less than valid versions and equal to each other. The language version "go1.21" compares less than the release candidate and eventual releases "go1.21rc1" and "go1.21.0". Custom toolchain suffixes are ignored during comparison: "go1.21.0" and "go1.21.0-bigcorp" are equal.
func FileVersions ¶
FileVersions always reports the a file's Go version as the zero version at this Go version.
func GoVersion ¶
GoVersion returns the Go version of the type package. It returns zero if no version can be determined.
func InitFileVersions ¶
InitFileVersions is a noop at this Go version.
Types ¶
This section is empty.