chore: update CI, dependencies, and linter
This commit is contained in:
committed by
GitHub
parent
a7324d7c32
commit
dec1ed84e3
6
app.go
6
app.go
@ -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)
|
||||
|
Reference in New Issue
Block a user