Skip to content

Commit

Permalink
cut: remove default mux
Browse files Browse the repository at this point in the history
  • Loading branch information
kenriortega committed Jul 25, 2021
1 parent f125094 commit 05fa0b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ type server struct {
}

func NewServer(host string, port int) *server {
mux := http.NewServeMux()

s := &http.Server{
Handler: mux,
Handler: nil,
Addr: fmt.Sprintf("%s:%d", host, port),
// Good practice: enforce timeouts for servers you create!
WriteTimeout: 15 * time.Second,
Expand All @@ -41,9 +41,9 @@ func NewServerSSL(host string, port int) *server {
tls.TLS_RSA_WITH_AES_256_CBC_SHA,
},
}
mux := http.NewServeMux()

s := &http.Server{
Handler: mux,
Handler: nil,
Addr: fmt.Sprintf("%s:%d", host, port),
// Good practice: enforce timeouts for servers you create!
WriteTimeout: 15 * time.Second,
Expand Down

0 comments on commit 05fa0b5

Please sign in to comment.