From 33fb7b1d7daadc47708c320d20a4b2295aeff371 Mon Sep 17 00:00:00 2001
From: youngmin <holyachon@gmail.com>
Date: Tue, 4 Jun 2024 14:47:51 +0900
Subject: [PATCH] fix: use errors.Is for checking equity

---
 http.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/http.go b/http.go
index c26c05f..58111d8 100644
--- a/http.go
+++ b/http.go
@@ -4,6 +4,7 @@ import (
 	"bytes"
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"io"
 	"net/http"
@@ -220,7 +221,7 @@ func ShouldRetryDefault(status int, err error) bool {
 	if status == http.StatusTooManyRequests {
 		return true
 	}
-	if err == io.ErrUnexpectedEOF {
+	if errors.Is(err, io.ErrUnexpectedEOF) {
 		return true
 	}