s3manager-web/router.go
2017-03-05 15:02:59 +01:00

19 lines
310 B
Go

package main
import (
"github.com/gorilla/mux"
)
// NewRouter creates a new router
func NewRouter() *mux.Router {
router := mux.NewRouter().StrictSlash(true)
for _, route := range routes {
router.
Methods(route.Method).
Path(route.Pattern).
HandlerFunc(route.HandlerFunc)
}
return router
}