Thanks to visit codestin.com
Credit goes to github.com

Skip to content

proposal: import/path: proposal fix err != nil by not fixing it #75454

@jlehew

Description

@jlehew

Proposal Details

I’ve been programming for 45 years. In High School we coded on punch cards on a system with core memory. It was huge and 15 years old. Anyways, I’m still at it building Amazon 2.0 at the moment with Claude and recently learned Go and using it for a RESTful API. I didn’t see a similar low risk suggestion in the list of error-handling proposals when I searched.

One major problem/complaint is devs don’t want to see the error code. Give them what they want without changing anything. Just hide it or show half of the error code indented.

The solution is simple: enhance the IDE in VS Code to automatically hide error code and in the left margin with line numbers add an expand feature to show it. Perhaps auto add a triangle next to the “err” in x, err := …. Like a dropdown arrow. If err code exists it is a solid down arrow, if no err code it is a hollow down arrow. This is similar to collapse all to definitions in VS but in this case it would be collapse all errors. Hovering over “err” on a line to see the err code in a popup. Basically fix this in the editor with UX changes only.

This approach requires no code changes, no testing, no installs, just an automatic extension update. This is the perfect low risk option. Just enhance existing VS Code and/or the Go Extension and add a couple right click menu items.

Let me know if you’d like an official proposal.

Hopefully that helps!
John

Metadata

Metadata

Assignees

No one assigned

    Labels

    LanguageProposalIssues describing a requested change to the Go language specification.Proposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions