mirror of
https://github.com/mpolden/echoip.git
synced 2025-07-21 00:06:08 +02:00
Rename Handlers -> Router
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user