Use github.com/julienschmidt/httprouter instead of gorilla

This commit is contained in:
nemunaire 2016-12-16 00:51:56 +01:00
parent 5a0b81ba32
commit 3b320469b5
13 changed files with 226 additions and 172 deletions

View file

@ -1,14 +1,11 @@
package api
import (
"github.com/gorilla/mux"
"github.com/julienschmidt/httprouter"
)
var api_router = mux.NewRouter().StrictSlash(true)
var router = httprouter.New()
var router = api_router.PathPrefix("/api/").Subrouter()
func Router() *mux.Router {
return api_router
func Router() *httprouter.Router {
return router
}