From cbdf6fe8282d281f57c8dd53443851d3d0690b03 Mon Sep 17 00:00:00 2001 From: avalonche Date: Sat, 3 Aug 2024 10:19:29 +1000 Subject: [PATCH] linting --- http/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/http.go b/http/http.go index f85fbba..4fdaf7d 100644 --- a/http/http.go +++ b/http/http.go @@ -131,7 +131,7 @@ func (s *Service) get(ctx context.Context, } } - statusFamily := resp.StatusCode / 100 + statusFamily := resp.StatusCode / http.StatusContinue if statusFamily != 2 { trimmedResponse := bytes.ReplaceAll(bytes.ReplaceAll(res.body, []byte{0x0a}, []byte{}), []byte{0x0d}, []byte{}) log.Debug().Int("status_code", resp.StatusCode).RawJSON("response", trimmedResponse).Msg("GET failed") @@ -250,7 +250,7 @@ func (s *Service) post(ctx context.Context, } } - statusFamily := resp.StatusCode / 100 + statusFamily := resp.StatusCode / http.StatusContinue if statusFamily != 2 { trimmedResponse := bytes.ReplaceAll(bytes.ReplaceAll(res.body, []byte{0x0a}, []byte{}), []byte{0x0d}, []byte{}) log.Debug().Int("status_code", resp.StatusCode).RawJSON("response", trimmedResponse).Msg("POST failed")