/ go Public
x/tools/gopls: add refactoring capabilities for plumbing context.Context #60081
Issues related to the Go language server, gopls.
Issues related to refactoring tools
Is your feature request related to a problem? Please describe.
As we add things like logging and tracing to more places in the codebase, I find I'm often plumbing the context.Context to new areas of the code. It's relatively straightforward but in a large codebase it can take a while.
Describe the solution you'd like
It would be great if there was refactor support for plumbing context back upwards through the function stack. I think its fairly standard to have
ctx context.Contextas the first item in a parameter list. I'd like to be able to put in a nested function call and then right click on the undefined variable error and have an error resolution be "plumb context from parent".
Describe alternatives you've considered
The only alternative I've considered is the refactor with some mixture of search/replace and manual fixes . I keep imagining one day I should be able to tell an LLM to do it for me. I searched through the vscode marketplace and didn't see anything that would do what I want.
The text was updated successfully, but these errors were encountered: