Skip to content

Commit

Permalink
lint: don't fail on wrapped errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maeb committed Jul 15, 2024
1 parent 22a5c1a commit 83baf58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package main

import (
"errors"
"fmt"
"net/http"
"os"
Expand Down Expand Up @@ -129,7 +130,7 @@ func main() {
// Serve metrics
log.Info().Str("address", addr).Msg("Server listening")
err = server.ListenAndServe()
if err != http.ErrServerClosed {
if errors.Is(err, http.ErrServerClosed) {
log.Err(err).Msg("")
}
}

0 comments on commit 83baf58

Please sign in to comment.