chore(lint): upgrade golangci-lint to v1.47.2

- Fix Slowloris attacks on HTTP servers
- Force set default of 5 minutes for pprof read timeout
- Change `ShutdownTimeout` to time.Duration since it cannot be set to 0
This commit is contained in:
Quentin McGaw
2022-07-28 21:55:10 +00:00
parent 877617cc53
commit a6f00f2fb2
24 changed files with 348 additions and 158 deletions

View File

@@ -29,16 +29,20 @@ func Test_New(t *testing.T) {
},
"filled settings": {
settings: Settings{
Address: ":8001",
Handler: someHandler,
Logger: someLogger,
ShutdownTimeout: durationPtr(time.Second),
Address: ":8001",
Handler: someHandler,
Logger: someLogger,
ReadHeaderTimeout: time.Second,
ReadTimeout: time.Second,
ShutdownTimeout: time.Second,
},
expected: &Server{
address: ":8001",
handler: someHandler,
logger: someLogger,
shutdownTimeout: time.Second,
address: ":8001",
handler: someHandler,
logger: someLogger,
readHeaderTimeout: time.Second,
readTimeout: time.Second,
shutdownTimeout: time.Second,
},
},
}