Skip to content

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