Skip to content

Commit 3f3dabe

Browse files
committed
fix: log.Error doesnt need a new line character
1 parent 2c4e34d commit 3f3dabe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/rest/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (s *restClient) send(req *http.Request) (*http.Response, error) {
240240
// Try the request
241241
if res, err = s.http.Do(req); err != nil {
242242
if IsClosedConnectionErr(err) {
243-
fmt.Printf("remote host force closed connection while requesting %s; attempt %d/%d; trying again\n", req.URL, retry+1, maxRetries)
243+
fmt.Printf("remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
244244
ExponentialBackoff(retry)
245245
continue
246246
}

cmd/start.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
220220
if response, err := bheClient.Do(req); err != nil {
221221
if rest.IsClosedConnectionErr(err) {
222222
// try again on force closed connection
223-
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
223+
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...", req.URL, retry+1, maxRetries)
224224
rest.ExponentialBackoff(retry)
225225

226226
if retry == maxRetries-1 {
@@ -288,7 +288,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
288288
if res, err = bheClient.Do(req); err != nil {
289289
if rest.IsClosedConnectionErr(err) {
290290
// try again on force closed connections
291-
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
291+
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...", req.URL, retry+1, maxRetries)
292292
rest.ExponentialBackoff(retry)
293293
continue
294294
}

0 commit comments

Comments
 (0)