Rename Handlers -> Router

This commit is contained in:
Martin Polden
2016-10-09 16:18:38 +02:00
parent d560f6108a
commit b1b3fbb5f3
3 changed files with 6 additions and 9 deletions

View File

@ -234,7 +234,7 @@ func (fn appHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}
func (a *API) Handlers() http.Handler {
func (a *API) Router() http.Handler {
r := mux.NewRouter()
// JSON
@ -258,8 +258,3 @@ func (a *API) Handlers() http.Handler {
return r
}
func (a *API) ListenAndServe(addr string) error {
http.Handle("/", a.Handlers())
return http.ListenAndServe(addr, nil)
}