mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 14:55:02 +00:00
Trim newlines before parenthesis end
This commit is contained in:
parent
9f12fbd3cc
commit
886f873fa4
@ -1117,7 +1117,9 @@ func generateUnexpectedResponseCodeError(resp *http.Response) error {
|
||||
var buf bytes.Buffer
|
||||
io.Copy(&buf, resp.Body)
|
||||
closeResponseBody(resp)
|
||||
return fmt.Errorf("Unexpected response code: %d (%s)", resp.StatusCode, buf.Bytes())
|
||||
|
||||
trimmed := strings.TrimSpace(string(buf.Bytes()))
|
||||
return fmt.Errorf("Unexpected response code: %d (%s)", resp.StatusCode, trimmed)
|
||||
}
|
||||
|
||||
func requireNotFoundOrOK(d time.Duration, resp *http.Response, e error) (bool, time.Duration, *http.Response, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user