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 Kubeops routes code #1430

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

SimonAlling
Copy link
Contributor

Description of the change

It introduces an abstraction for defining routes, making the definitions clearer, shorter and DRYer.

Benefits

  • Easier to define routes in main.
  • Reduced code repetition.
  • Less clutter, highlighting actual content.
  • Less room for mistakes.

Possible drawbacks

  • Routes are forced to be very similar in behavior to each other.

Benefits:

  * Easier to define routes in `main`.
  * Reduced code repetition.
  * Less clutter, highlighting actual content.
  * Less room for mistakes.

Drawbacks:

  * Routes are forced to be very similar in behavior to each other.
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

AddRouteWith is a bit more difficult to read but it's true that now the routes are much more clear. Thanks! It works as far as the routes behave similarly

@andresmgot andresmgot merged commit 2c49e76 into vmware-tanzu:master Jan 10, 2020
@SimonAlling
Copy link
Contributor Author

AddRouteWith is a bit more difficult to read

Yeah. Go's absence of (general) type inference sure doesn't help either.

@SimonAlling SimonAlling deleted the helm3-refactor-routes branch January 10, 2020 12:37
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.

2 participants