gorilla / mux

Package gorilla/mux is a powerful HTTP router and URL matcher for building Go web servers with 🦍
https://gorilla.github.io
BSD 3-Clause "New" or "Revised" License
20.92k stars 1.85k forks source link

router.Host not working for me #752

Closed ikaasraa closed 8 months ago

ikaasraa commented 8 months ago
sd := router.Host("{subdomain:[a-z]+}.domain.com").Subrouter()
sd.Path("/").HandlerFunc(handlers.SubdomainHandler).Methods("GET")

router.HandleFunc("/", handlers.HomeHandler).Methods("GET")

it's not working ??? when I call / load HomeHandler but when I call lh.localhost:300 again load HomeHandler instead SubDomainHandler