Change function gorillize signature slightly
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
func gorillize(rs []model.Route, f func(*model.Handler) http.Handler) *mux.Router {
|
func gorillize(rs []model.Route, f func(*model.Route) http.Handler) *mux.Router {
|
||||||
m := mux.NewRouter()
|
m := mux.NewRouter()
|
||||||
|
|
||||||
for _, r := range rs {
|
for _, r := range rs {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handlerStatusOK(h *model.Handler) http.Handler {
|
func handlerStatusOK(h *model.Route) http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user