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

Remove WithoutParams #1321

Closed

Conversation

SimonAlling
Copy link
Contributor

It is a special case of WithParams only used for ListAllReleases.

(Removing the WithParams abstraction altogether seems to be a completely different story – much harder than implied by the types of CreateRelease et al., mux.Vars and http.HandlerFunc.)

It is a special case of WithParams only used for ListAllReleases.
@SimonAlling
Copy link
Contributor Author

This comment on #1311 is somewhat relevant.

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.

Thanks for the investigation @SimonAlling

With the current status, I am not sure of the benefits of this particular change. I'd rather have WithoutParams to clarify that the method doesn't require external parameters rather than calling WithParams with an empty object for the params. I think the former is more readable. What do you think?

@SimonAlling
Copy link
Contributor Author

I think my inner typechecker is trying to convince me that the empty map is also a map, but I definitely see your point. I tried redefining WithoutParams as a wrapper around WithParams to dry the code up a bit, but Go's type system is beyond me sometimes.

@SimonAlling
Copy link
Contributor Author

Since the PR doesn't even pass the CI and it doesn't add a lot of value anyway, I'm closing it.

@andresmgot
Copy link
Contributor

FWIW the error in the CI is unrelated to your changes, it's just a flaky test. Thanks anyway!

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