diff --git a/main.go b/main.go index 80eba09..24dce5f 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,7 @@ import ( "runtime" "runtime/pprof" "syscall" + "time" "github.com/caarlos0/env/v10" @@ -45,8 +46,9 @@ func main() { Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { fmt.Fprintln(w, "hello, world!") }), - ErrorLog: logger, - BaseContext: func(ln net.Listener) context.Context { return ctx }, + ErrorLog: logger, + BaseContext: func(ln net.Listener) context.Context { return ctx }, + WriteTimeout: 500 * time.Millisecond, } done := make(chan os.Signal, 1)