---
title: "Gopls release v0.23.0 (expected July 2026)"
---

In this release:

- [commits](https://go.googlesource.com/tools/+log/refs/heads/gopls-release-branch.0.22..refs/heads/gopls-release-branch.0.23)
- [issues closed](https://github.com/golang/go/milestone/432?closed=1)

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.

## Configuration changes

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.

## Web-based features

## Editing features

### Autocompletion suggests Go 1.27 promoted fields
<!-- golang/go#78553 -->
In files targeting Go 1.27 or later, autocompletion now suggests fields promoted from embedded structs within struct literals.

### Inlay hints for Go 1.27 promoted fields
<!-- golang/go#78553 -->
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}`).

## Analysis features

Gopls is now using staticcheck [v0.8.0-rc1](https://github.com/dominikh/go-tools/releases/tag/2026.2rc1).

### `sqlrowserr` analyzer
<!-- golang/go#17747 -->
The `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 files
<!-- golang/go#76190 -->
The `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 methods
<!-- golang/go#79801 -->
The `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](https://go.dev/wiki/Deprecated).

## Code transformation features

### `stubmethods` code action supports Go 1.27 generic interfaces
<!-- golang/go#77549 -->
The `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 fields
<!-- golang/go#78553 -->
In 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.

### "Add test for func" uses `t.Context()`
<!-- golang/go#79647 -->
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()`.
