Skip to content

refactor: replace type assertion on errors#315

Merged
tenthirtyam merged 1 commit intomainfrom
refactor/replaces-type-assertion-2
May 22, 2025
Merged

refactor: replace type assertion on errors#315
tenthirtyam merged 1 commit intomainfrom
refactor/replaces-type-assertion-2

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

Replaces type assertion on errors with a call to errors.As.

The preferred way for checking for a specific error type is to use the errors.As function from the standard library as this function traverses the chain of the wrapped errors while checking for a specific error type.

refactor: replace type assertion on errors
Replaces type assertion on errors with a call to `errors.As`.

The preferred way for checking for a specific error type is to use the `errors.As` function from the standard library as this function traverses the chain of the wrapped errors while checking for a specific error type.

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam added this to the v1.2.0 milestone May 22, 2025
@tenthirtyam tenthirtyam requested a review from JenGoldstrich May 22, 2025 02:29
@tenthirtyam tenthirtyam self-assigned this May 22, 2025
@tenthirtyam tenthirtyam requested a review from a team as a code owner May 22, 2025 02:29
@tenthirtyam tenthirtyam merged commit f7bfb99 into main May 22, 2025
14 checks passed
@tenthirtyam tenthirtyam deleted the refactor/replaces-type-assertion-2 branch May 22, 2025 05:12
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants