Skip to content

Commit

Permalink
Update errors.go
Browse files Browse the repository at this point in the history
  • Loading branch information
rezbera committed Feb 17, 2025
1 parent 554cb3c commit 606da80
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions primitives/net/http/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ type TimeoutError interface {
// status.
// Returns true if the error is a timeout error, false otherwise.
func IsTimeoutError(e error) bool {
if e == nil {
return false
}
//nolint:errorlint // by design.
t, ok := e.(TimeoutError)
var t TimeoutError
ok := errors.As(e, &t)
return ok && t.Timeout()

Check failure on line 49 in primitives/net/http/errors.go

View workflow job for this annotation

GitHub Actions / nilaway

error: Potential nil panic detected. Observed nil flow from source to dereference point:
}

0 comments on commit 606da80

Please sign in to comment.