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

Mux compat #2

Merged
merged 3 commits into from
Mar 1, 2024
Merged

Mux compat #2

merged 3 commits into from
Mar 1, 2024

Conversation

umputun
Copy link
Member

@umputun umputun commented Mar 1, 2024

This PR is to make routegroup.Bundle more compatible with the standard mux.

  1. Change Handle func to accept http.Handler, not http.HandlerFunc like it was before. This is a breaking change
  2. Add HandlerFunc accepting http.HandlerFunc` as a parameter
  3. Add Handler to locate the handler and the pattern that matches the request

The result of this change is fill compatibility between http.SeverMux and routegroup.Bundle

eugene added 3 commits March 1, 2024 11:43
Refactored the method of registering handlers in the routegroup operations, replacing `Handle` with `HandleFunc` for compatibility with mux. New `Handle` was added, accepting `http.Handler` param like the name suggests and the standard mux does. Also added `Handler` method redirecting to the mux
@umputun umputun merged commit 6d76cde into master Mar 1, 2024
3 checks passed
@umputun umputun deleted the mux-compat branch March 1, 2024 17:55
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.

1 participant