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

Resolve nogo tautological linting error #364

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

cameron-stripe
Copy link
Contributor

Description

nogo's static analysis finds an issue with a line in GetListWithContext, specifically this line:

if options != nil {

The error is

tautological condition: non-nil != nil

The issue seems to be that options is initialized to a non-nil value (&GetQueryOptions{}), then immediately checked against nil despite the absence of any modifications that could make it nil.

This change just fixes this error by removing the nil check; if you'd prefer to keep it, feel free to just close the PR!

Checklist

@andygrunwald
Copy link
Owner

Thanks a lot for the contribution, @cameron-stripe

@andygrunwald andygrunwald merged commit c64f012 into andygrunwald:master Mar 17, 2021
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.

2 participants