Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Aug 3, 2024
1 parent b7350f3 commit cbdf6fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit cbdf6fe

Please sign in to comment.