-
Notifications
You must be signed in to change notification settings - Fork 825
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
Fix cyclomatic complexity in cmd/controller/main.go #177
Comments
There's a consistent pattern in With some small refactoring, we could do this:
Alternatively, if that seems too fancy, we could also simple extract a named function for each started goroutine. Thoughts? |
I've actually often wondered if each Controller should/could implement an interface, and if there was value in that - sounds like there might be. I'm definitely not adverse to this approach. This kinda starts us down an opinionated framework for controllers path - which is not the end of the world. |
I'll put together the PR with that pattern and we can revisit the question of making controllers implement a common interface. |
Remove the
// nolint
comment.The main function has a cyclomatic complexity greater than 10. Refactor the function to lower it.
The text was updated successfully, but these errors were encountered: