-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
Describe the solution you'd like
Go requires that you must explicit error handling, so many times you must write some boring error handling code, and postfix completion can ease the pain.
rr
In most cases, we just need check the error and return it.
This also depends on the return parameters of the current function, for example, when the function has return values other than error, the return values other than error will use default values.
reterr
Sometimes when calling a function, you just need to check if there is an error.
varCheckError
Get the return value after calling the function and check for errors. This is a more general version compared to reterr.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.