🔧 Used already defined context as base context in HTTP requests

This commit is contained in:
Maxim Lebedev 2023-11-08 02:33:29 +06:00
parent 70b0906054
commit aaba6edc39
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"flag"
"fmt"
"log"
"net"
"net/http"
"os"
"os/signal"
@ -45,6 +46,7 @@ func main() {
fmt.Fprintln(w, "hello, world!")
}),
ErrorLog: logger,
BaseContext: func(ln net.Listener) context.Context { return ctx },
}
done := make(chan os.Signal, 1)