Skip to content
New issue

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

snippet for errors.Is and errors.As #3360

Open
igorcafe opened this issue Apr 23, 2024 · 0 comments
Open

snippet for errors.Is and errors.As #3360

igorcafe opened this issue Apr 23, 2024 · 0 comments

Comments

@igorcafe
Copy link

Is your feature request related to a problem? Please describe.
Not exactly.
I love the extension snippets, I use iferr all the time and I miss a snippet to errors.Is and As.

Describe the solution you'd like
Suggestion:
erris -> if errors.Is(err, <cursor>) { ... }
erras -> if errors.As(err, &<cursor>) { ... }

Describe alternatives you've considered
Typing it manually.

Additional context
Add any other context or screenshots about the feature request here.

@gopherbot gopherbot added this to the Untriaged milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants