func main() { r := mux.NewRouter() n := mw.Default(gorilla.Vars) r.Handle("/", n.Then(index)) r.Handle("/products/{id}", n.Then(products)) log.Fatal(http.ListenAndServe(":8080", r)) }
func TestDefault(t *testing.T) { is := is.New(t) def := mw.Default() is.NotNil(def) }
// Default creates new Wok with the default Noodle middleware chain func Default(mws ...noodle.Middleware) *Wok { return New(mw.Default(mws...)...) }