From 4446d200f4638cd415984ef887ba26b0674321cf Mon Sep 17 00:00:00 2001 From: some Date: Wed, 2 Oct 2024 14:14:02 -0400 Subject: [PATCH] Remove basePath --- server.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server.go b/server.go index 295f73f..08fb1c3 100644 --- a/server.go +++ b/server.go @@ -10,23 +10,21 @@ import ( type Server struct { *http.ServeMux - basePath string - Logger log.Logger + Logger log.Logger } -func NewServer(mux *http.ServeMux, basePath string, logger log.Logger) *Server { +func NewServer(mux *http.ServeMux, logger log.Logger) *Server { if mux == nil { mux = http.NewServeMux() } return &Server{ ServeMux: mux, - basePath: basePath, Logger: logger, } } func (s *Server) Handle(pattern string, handler http.Handler) { - s.ServeMux.Handle(s.basePath+pattern, handler) + s.ServeMux.Handle(pattern, handler) } func (s *Server) RegisterCallbackServer(srv server.CallbackServer) {