Compare commits

...

3 Commits

1 changed files with 5 additions and 0 deletions

View File

@ -5,12 +5,14 @@ import (
"flag"
"fmt"
"log"
"net"
"net/http"
"os"
"os/signal"
"runtime"
"runtime/pprof"
"syscall"
"time"
"github.com/caarlos0/env/v10"
@ -44,6 +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 },
WriteTimeout: 500 * time.Millisecond,
}
done := make(chan os.Signal, 1)