aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorStefan Majewsky <stefan.majewsky@sap.com>2023-10-25 13:49:14 +0200
committerGitHub <noreply@github.com>2023-10-25 13:49:14 +0200
commitc48895200c34150e8ed0e6c726d6123310e88804 (patch)
tree3ae8d6b34cbed323d0936503ecd579695c762249 /errors.go
parent1bc6c5a6fcf5bf0f52a960b6df87b6bd04e10956 (diff)
parent6f2956376fa67c4fd3abbed65d1ec20bea2b9e00 (diff)
downloadgo-schwift-c48895200c34150e8ed0e6c726d6123310e88804.tar.gz
Merge pull request #16 from SuperSandro2000/fix-lints
Fix remaining lints
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/errors.go b/errors.go
index 06fa639..a79dd60 100644
--- a/errors.go
+++ b/errors.go
@@ -24,6 +24,8 @@ import (
"net/http"
"strconv"
"strings"
+
+ "github.com/majewsky/schwift/internal/errext"
)
var (
@@ -148,7 +150,7 @@ func (e BulkError) Error() string {
//
// It is safe to pass a nil error, in which case Is() always returns false.
func Is(err error, code int) bool {
- if e, ok := err.(UnexpectedStatusCodeError); ok {
+ if e, ok := errext.As[UnexpectedStatusCodeError](err); ok {
return e.ActualResponse.StatusCode == code
}
return false