From c337b64e439b733eb5905d8ebbe080f162bf7a5f Mon Sep 17 00:00:00 2001 From: francisco souza Date: Sat, 20 Mar 2021 23:18:28 -0400 Subject: [PATCH] fakestorage: simplify code a bit --- fakestorage/server.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fakestorage/server.go b/fakestorage/server.go index c8bcfb5266..ea154e8515 100644 --- a/fakestorage/server.go +++ b/fakestorage/server.go @@ -123,7 +123,7 @@ func NewServerWithOptions(options Options) (*Server, error) { handler = handlers.LoggingHandler(options.Writer, handler) } handler = requestCompressHandler(handler) - s.setTransportToMux(handler) + s.transport = &muxTransport{handler: handler} if options.NoListener { return s, nil } @@ -174,10 +174,6 @@ func newServer(options Options) (*Server, error) { return &s, nil } -func (s *Server) setTransportToMux(handler http.Handler) { - s.transport = &muxTransport{handler: handler} -} - func (s *Server) buildMuxer() { const apiPrefix = "/storage/v1" s.mux = mux.NewRouter()