Skip to content

feat(std-http): accept Mux interface instead of *http.ServeMux #1720

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

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

sonalys
Copy link
Contributor

@sonalys sonalys commented Aug 9, 2024

Description

As described on Issue #1718, I'm implementing receiving Mux as interface instead of *http.ServeMux.
Following the open-closed principle, it will allow the library to be more customizable for the developers.

@@ -3,21 +3,27 @@ func Handler(si ServerInterface) http.Handler {
return HandlerWithOptions(si, StdHTTPServerOptions{})
}

// ServeMux is an abstraction of http.ServeMux.
type ServeMux interface {
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be exported? Probably no big deal it is, but thought I'd ask

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It’s good since you use it in the method’s arguments.

Copy link
Member

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! 1 comment then :shipit:

@jamietanna jamietanna added this to the v2.4.0 milestone Aug 19, 2024
@jamietanna jamietanna added the enhancement New feature or request label Sep 19, 2024
@jamietanna jamietanna changed the title feat(std-http): accept Mux as interface instead of *http.ServeMux feat(std-http): accept Mux interface instead of *http.ServeMux Sep 20, 2024
@jamietanna jamietanna enabled auto-merge (squash) September 20, 2024 10:11
Copy link
Member

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

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

Thank you!

@jamietanna jamietanna merged commit 4471ef5 into oapi-codegen:main Sep 20, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy