Skip to content

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.

}

// 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!

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