Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
denopink committed Feb 27, 2024
1 parent e2b43e9 commit 8d4d453
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions httpClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"errors"
"net"
"net/http"
"net/url"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -101,8 +102,10 @@ func getDoErrReason(err error) string {
return opErrReason

Check warning on line 102 in httpClient.go

View check run for this annotation

Codecov / codecov/patch

httpClient.go#L102

Added line #L102 was not covered by tests
} else if errors.Is(err, net.UnknownNetworkError("")) {
return networkErrReason

Check warning on line 104 in httpClient.go

View check run for this annotation

Codecov / codecov/patch

httpClient.go#L104

Added line #L104 was not covered by tests
} else if err := errors.Unwrap(err).Error(); strings.TrimSpace(strings.ToLower(err)) == "eof" {
return connectionUnexpectedlyClosedEOFReason
} else if err, ok := err.(*url.Error); ok {
if strings.TrimSpace(strings.ToLower(err.Unwrap().Error())) == "eof" {
return connectionUnexpectedlyClosedEOFReason
}

Check warning on line 108 in httpClient.go

View check run for this annotation

Codecov / codecov/patch

httpClient.go#L106-L108

Added lines #L106 - L108 were not covered by tests
}

return genericDoReason
Expand Down

0 comments on commit 8d4d453

Please sign in to comment.