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

refactor(query-service): remove redundant nil check #3614

Merged
merged 1 commit into from
Sep 24, 2023
Merged

refactor(query-service): remove redundant nil check #3614

merged 1 commit into from
Sep 24, 2023

Conversation

Juneezee
Copy link
Contributor

From the Go specification (https://go.dev/ref/spec#For_range):

"1. For a nil slice, the number of iterations is 0."
"3. If the map is nil, the number of iterations is 0."

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

From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."
  "3. If the map is nil, the number of iterations is 0."

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 <engzerjun@gmail.com>
@welcome
Copy link

welcome bot commented Sep 24, 2023

Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗

@CLAassistant
Copy link

CLAassistant commented Sep 24, 2023

CLA assistant check
All committers have signed the CLA.

@srikanthccv srikanthccv merged commit dc4acc0 into SigNoz:develop Sep 24, 2023
7 of 8 checks passed
@welcome
Copy link

welcome bot commented Sep 24, 2023

Congrats on merging your first pull request!
minion-party
We here at SigNoz are proud of you! 🥳

manishm pushed a commit to manishm/SIGFOR that referenced this pull request Sep 27, 2023
From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."
  "3. If the map is nil, the number of iterations is 0."

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 <engzerjun@gmail.com>
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