Skip to content

Use errors.Is/errors.As instead of == comparisons against errors#85

Closed
bahrmichael wants to merge 1 commit into
masterfrom
errors-is-as-ca48309d-c4cc-4f7f-8d9b-bed63f653eda
Closed

Use errors.Is/errors.As instead of == comparisons against errors#85
bahrmichael wants to merge 1 commit into
masterfrom
errors-is-as-ca48309d-c4cc-4f7f-8d9b-bed63f653eda

Conversation

@bahrmichael

Copy link
Copy Markdown

This change replaces direct == / != comparisons against error values with the
standard-library helpers errors.Is (for sentinel errors) and errors.As (for error
type assertions used in control flow).

err == nil / err != nil nil-checks are intentionally left unchanged.

Generated by a Sourcegraph batch change.

Created by Sourcegraph batch change bahrmichael/ca48309d-c4cc-4f7f-8d9b-bed63f653eda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant