Skip to content

Conversation

Juneezee
Copy link
Contributor

From the Go specification:

"1. For a nil slice, the number of iterations is 0." https://go.dev/ref/spec#For_range

Both Keys and Arguments are []string. Therefore, an additional nil check for before the loop is unnecessary. Example: https://go.dev/play/p/R57hixwdkhX

From the Go specification:

  "1. For a nil slice, the number of iterations is 0." [1]

Therefore, an additional nil check for before the loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <[email protected]>
Copy link
Contributor

@SoulPancake SoulPancake left a comment

Choose a reason for hiding this comment

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

LGTM

@ofekshenawa ofekshenawa merged commit 275af73 into redis:master Sep 27, 2023
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