Skip to content

Proposal: Note that VS Code and GoLand have provided “inlay hints” that can avoid naked parameters #166

Open
@pan93412

Description

@pan93412

Related part: https://github.com/uber-go/guide/blob/master/style.md#avoid-naked-parameters

Both VS Code (with Go extension) and GoLand have provided “inlay hints” that can show every parameters name:

image

image

I wonder if we can add a section mentioning this feature to give the newer codebase another choice – no need to write such a hint explicitly? This feature makes us no longer need to write C-style comments anymore, since maintaining a separate comment can be easily out-of-sync with the original parameter name, and writing such a comment is a bit uninteresting for this IDE era, I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions