diff --git a/handler.go b/handler.go index e70368c49..f9c3435af 100644 --- a/handler.go +++ b/handler.go @@ -60,7 +60,7 @@ func (resp *QueryResponse) MarshalJSON() ([]byte, error) { return json.Marshal(output) } -type Handlerer interface { +type Handler interface { http.Handler GetAPI() *API } @@ -73,6 +73,6 @@ func (n *NopHandler) GetAPI() *API { return nil } -func NewNopHandler() Handlerer { +func NewNopHandler() Handler { return &NopHandler{} } diff --git a/server.go b/server.go index d73c9ce82..98a2dc16b 100644 --- a/server.go +++ b/server.go @@ -59,7 +59,7 @@ type Server struct { executor *Executor // External - handler Handlerer + handler Handler Broadcaster Broadcaster BroadcastReceiver BroadcastReceiver Gossiper Gossiper @@ -127,7 +127,7 @@ func OptServerLongQueryTime(dur time.Duration) ServerOption { } } -func OptServerHandler(h Handlerer) ServerOption { +func OptServerHandler(h Handler) ServerOption { return func(s *Server) error { s.handler = h return nil