Skip to content

add gorilla mux adapter #3

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

Closed
wants to merge 1 commit into from
Closed

add gorilla mux adapter #3

wants to merge 1 commit into from

Conversation

moqsien
Copy link

@moqsien moqsien commented Apr 9, 2025

No description provided.

@its-felix
Copy link
Owner

its-felix commented Apr 15, 2025

Hey, thank you for the contribution!

Since *mux.Router implements http.Handler, there is no need for a separate gorilla mux adapter. You can simply use the vanilla adapter with gorilla mux:

func main() {
	r := mux.NewRouter()
	r.Handle("/ping", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request){
		w.WriteHeader(http.StatusOK)
		w.Write([]byte("pong"))
	}))

	adapter := adapter.NewVanillaAdapter(r)
}

@its-felix its-felix closed this Apr 15, 2025
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