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

replaces fallthrough statement in InitFrontend #4589

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Oct 29, 2021

This replaces the fallthrough usage in InitFrontend with an || clause. I think this is simpler/more understandable, especially because there is no prior logic run before the fallthrough. The results are equivalent, see example below:

https://play.golang.org/p/vdyYW8UMp7c

@owen-d owen-d requested a review from a team as a code owner October 29, 2021 13:39
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

❤️ thanks!

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

Lol, Go developers have no appreciation for how case statements were meant to work....

@owen-d owen-d merged commit 1ef1ff0 into grafana:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants