We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I feel we can remove the nesting from the code present in "Error Types" section under "Error" Category in Style.md file
From -
// package foo var ErrCouldNotOpen = errors.New("could not open") func Open() error { return ErrCouldNotOpen } // package bar if err := foo.Open(); err != nil { if errors.Is(err, foo.ErrCouldNotOpen) { // handle the error } else { panic("unknown error") } }
To -
// package foo var ErrCouldNotOpen = errors.New("could not open") func Open() error { return ErrCouldNotOpen } // package bar err := foo.Open(); if errors.Is(err, foo.ErrCouldNotOpen) { // handle the error } else if err!=nil { panic("unknown error") }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I feel we can remove the nesting from the code present in "Error Types" section under "Error" Category in Style.md file
From -
To -
The text was updated successfully, but these errors were encountered: