From 6f2956376fa67c4fd3abbed65d1ec20bea2b9e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 24 Oct 2023 11:17:14 +0200 Subject: Fix remaining lints --- errors.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'errors.go') 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 -- cgit v1.2.3