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

chore: remove redundant nil checks #44

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

snprajwal
Copy link
Member

Makes golangci-lint happy🎉

@adrianreber
Copy link
Member

Technically the linter is correct, but I don't think it is completely necessary. But let's make the linter happy. Can you update the commit message to contain the error this is fixing? I had to look at one of the error messages in the open PRs.

The length of a nil slice in Go is 0. Hence, a pattern like `if arr !=
nil && len(arr) > 0` is redundant. The nil check can be elided.

Signed-off-by: Prajwal S N <[email protected]>
Copy link
Member

@rst0git rst0git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rst0git rst0git merged commit 711be9c into checkpoint-restore:main Oct 28, 2024
6 checks passed
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.

3 participants