In this release:
Key features are described below.
The main purpose of this relatively small release is to ensure that users of the Go 1.27 release candidate enjoy full support for the latest language features, alongside various bug fixes and improvements.
The errorsastype analyzer added in the previous release (which detects shadowing mistakes using errors.AsType) was renamed to errorsastypeshadow to avoid an unfortunate conflict with a modernizer of the same name, which suggests fixes to replace calls to errors.As by AsType.
As part of an ongoing effort to revamp the gopls CLI (which is not a supported stable interface) to make it more useful and efficient for both humans and agents, several obsolete subcommands (gopls fix, gopls inspect, and gopls bug) have been removed. Users should use gopls codeaction instead of gopls fix, and gopls remote instead of gopls inspect. The main serve command continues to work as expected.
The importsSource setting has been removed (commit 289728936). Gopls now exclusively uses its built-in imports engine, and users who still have this option in their configuration will receive a warning diagnostic.
In files targeting Go 1.27 or later, autocompletion now suggests fields promoted from embedded structs within struct literals.
In files targeting Go 1.27 or later, composite literal field name inlay hints (compositeLiteralFields) show the implicit selection path for promoted fields (e.g. A{«B.C.»F: 0}).
Gopls is now using staticcheck v0.8.0-rc1.
sqlrowserr analyzerThe sqlrowserr analyzer reports failure to call the Err method after calling the Next method of sql.Rows in a loop.
inline analyzer skips inlining in dedicated test filesThe inline analyzer now avoids inlining calls to a symbol from its dedicated test files (e.g., uses in foo_test.go of a symbol declared in foo.go), for functions, constants, and type aliases.
deprecated analyzer supports trailing line comments on fields and interface methodsThe deprecated analyzer now detects deprecations specified in trailing line comments next to struct fields and interface methods (for example, field int // Deprecated: use newField), in anticipation of updates to the Go Deprecated guidelines.
stubmethods code action supports Go 1.27 generic interfacesThe Declare missing methods (stubmethods) quick-fix now supports instantiating generic interfaces in files targeting Go 1.27 or later, generating correct method signatures with concrete type arguments.
fillstruct code action supports Go 1.27 promoted fieldsIn files targeting Go 1.27 or later, the fillstruct code action now populates promoted fields of embedded structs directly in the parent struct literal. It uses a “minimum expansion” style: it only flattens/expands embedded structs along paths that have already been partially initialized by the user, leaving other embedded structs unexpanded.
t.Context()When the function or method under test takes context.Context as its first parameter and the module is on Go 1.24 or later, the generated test now passes t.Context() instead of context.Background(). Modules on older Go versions continue to receive context.Background().