Documentation ¶
Overview ¶
Package goversions defines gopls's policy for which versions of Go it supports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Supported = []Support{
{12, "", "v0.7.5"},
{15, "", "v0.9.5"},
{16, "", "v0.11.0"},
{17, "", "v0.11.0"},
{18, "", "v0.14.2"},
{19, "v0.17.0", "v0.15.3"},
{20, "v0.17.0", "v0.15.3"},
}
Supported maps Go versions to the gopls version in which support will be deprecated, and the final gopls version supporting them without warnings. Keep this in sync with gopls/README.md.
Must be sorted in ascending order of Go version.
Exposed (and mutable) for testing.
Functions ¶
func Message ¶
Message returns the message to display if the user has the given Go version, if any. The goVersion variable is the X in Go 1.X. If fromBuild is set, the Go version is the version used to build gopls. Otherwise, it is the go command version.
The second component of the result indicates whether the message is an error, not a mere warning.
If goVersion is invalid (< 0), it returns "", false.
func OldestSupported ¶
func OldestSupported() int
OldestSupported is the last X in Go 1.X that this version of gopls supports without warnings.
Exported for testing.
Types ¶
type Support ¶
type Support struct { // GoVersion is the Go version to which these settings relate. GoVersion int // DeprecatedVersion is the first version of gopls that no longer supports // this Go version. // // If unset, the version is already deprecated. DeprecatedVersion string // InstallGoplsVersion is the latest gopls version that supports this Go // version without warnings. InstallGoplsVersion string }
Support holds information about end-of-life Go version support.
Exposed for testing.