Change function gorillize signature slightly

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-10-08 21:09:48 +02:00
parent 2cd96d5a4b
commit f656f9f3b0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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)
}) })