Skip to content

Commit

Permalink
fakestorage: simplify code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Mar 21, 2021
1 parent 9e93277 commit c337b64
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fakestorage/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c337b64

Please sign in to comment.