Use github.com/julienschmidt/httprouter instead of gorilla
This commit is contained in:
parent
5a0b81ba32
commit
3b320469b5
13 changed files with 226 additions and 172 deletions
|
@ -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
|
||||
}
|
||||
|
|
Reference in a new issue