// Setup a route to be executed when the specific path prefix is matched, uses the gorilla mux router.
Setup a route to be executed when the specific path prefix is matched, uses the gorilla mux router.
// Setup a route to be executed when the specific path prefix is matched uses the gorilla mux router .
func (m *Milo) PathPrefix(path string, methods []string, hf http.HandlerFunc) {
	fn := func(w http.ResponseWriter, r *http.Request) {
		m.runRoute(w, r, hf, path)
	}
	if methods != nil {
		m.router.PathPrefix(path).Methods(methods...).HandlerFunc(fn)
	} else {
		m.router.PathPrefix(path).HandlerFunc(fn)
	}
}
func ( m * Milo ) PathPrefix ( path string , methods [ ] string , hf http . HandlerFunc ) { fn := func ( w http . ResponseWriter , r * http . Request ) { m . runRoute ( w , r , hf , path ) } if methods != nil { m . router . PathPrefix ( path ) . Methods ( methods ... ) . HandlerFunc ( fn ) } else { m . router . PathPrefix ( path ) . HandlerFunc ( fn ) } }
Setup a route to be executed when the specific path prefix is matched, uses the gorilla mux router.
Setup a route to be executed when the specific path prefix is matched uses the gorilla mux router .