chore: update CI, dependencies, and linter

This commit is contained in:
Ludovic Fernandez
2024-05-07 17:36:04 +02:00
committed by GitHub
parent a7324d7c32
commit dec1ed84e3
7 changed files with 27 additions and 23 deletions

6
app.go
View File

@ -31,7 +31,7 @@ const (
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
CheckOrigin: func(_ *http.Request) bool {
return true
},
}
@ -89,7 +89,7 @@ func main() {
Handler: mux,
}
if len(ca) > 0 {
if ca != "" {
server.TLSConfig = setupMutualTLS(ca)
}
@ -211,7 +211,7 @@ func whoamiHandler(w http.ResponseWriter, r *http.Request) {
queryParams := r.URL.Query()
wait := queryParams.Get("wait")
if len(wait) > 0 {
if wait != "" {
duration, err := time.ParseDuration(wait)
if err == nil {
time.Sleep(duration)