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

Fix redundant error handling #7823

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Fix redundant error handling #7823

merged 1 commit into from
Feb 8, 2022

Conversation

olix0r
Copy link
Member

@olix0r olix0r commented Feb 7, 2022

Various methods check if an error is nil before returning it, however
continuing down the code path returns a nil. This can be reduced to
just returning the error whether it is nil or not.

Various methods check if an error is `nil` before returning it, however
continuing down the code path returns a `nil`. This can be reduced to
just returning the error whether it is `nil` or not.

Signed-off-by: Oliver Gould <ver@buoyant.io>
@olix0r olix0r requested a review from a team as a code owner February 7, 2022 19:12
@olix0r olix0r added the go Pull requests that update Go code label Feb 7, 2022
@olix0r olix0r merged commit b62dd79 into main Feb 8, 2022
@olix0r olix0r deleted the ver/fixup-return-err branch February 8, 2022 03:17
olix0r added a commit that referenced this pull request Apr 14, 2022
Various methods check if an error is `nil` before returning it, however
continuing down the code path returns a `nil`. This can be reduced to
just returning the error whether it is `nil` or not.

Signed-off-by: Oliver Gould <ver@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants