Skip to content

x/tools/gopls: feature: offer a quickfix to define a struct field on "has no field or method" error #70217

Open
@dennypenta

Description

@dennypenta

gopls version

v0.16.2

go env

-

What did you do?

Having a cursor on a non defined field doesn't suggest a quickfix to declare a new struct field.
Recently a similar feature was merged #69692 to define a missing method.
However, the ability to make a field is missing.
Screenshot 2024-11-06 at 09 07 37

What did you see happen?

no action suggested
Screenshot 2024-11-06 at 09 07 48

What did you expect to see?

A suggested quick fix "Define a struct field" exists and create a field
Screenshot 2024-11-06 at 09 08 09

Editor and settings

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions