x/tools/gopls: track uses with fillreturns adding error returns #47637
Labels
FeatureRequest
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Fillreturns uses any in-scope variables when they match the type, but this doesn't work well with error returns.
An example of this is found in https://www.youtube.com/watch?v=6r08zGi38Tk around the 11:20 mark. The
err
return variable has already been used in an earlier return statement, but we still return it again below. It would be nice to check that it had already been used and usenil
instead.The text was updated successfully, but these errors were encountered: