From e30dc734e5dfca8927859a315ac9ba500b830635 Mon Sep 17 00:00:00 2001 From: David Aparicio Date: Sun, 23 Oct 2022 11:44:46 +0200 Subject: [PATCH] test gosec --- cmd/server/main.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 9d89af9..ea5e0f3 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -6,7 +6,6 @@ import ( "fmt" "log" "net/http" - "time" //Be careful!!! http://mmcloughlin.com/posts/your-pprof-is-showing //_ "net/http/pprof" @@ -50,17 +49,7 @@ func main() { r.HandleFunc("/details", handleDetails) http.Handle("/", r) - srv := &http.Server{ - Addr: ":8080", - ReadTimeout: 1 * time.Second, - WriteTimeout: 1 * time.Second, - IdleTimeout: 30 * time.Second, - ReadHeaderTimeout: 2 * time.Second, - Handler: r, - //TLSConfig: tlsConfig, - } - - if err := srv.ListenAndServe(); err != nil { + if err := http.ListenAndServe(":8080", nil); err != nil { log.Fatal(err) } }