From e2c31570df006b0e2b566ef329dfb2a890c2bdda Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 25 Dec 2020 10:57:44 +0100 Subject: [PATCH] Fix incorrect logging calls that don't do formatting The errors can be found by running `go vet`. Found these issues while packaging. --- config.go | 2 +- conn.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.go b/config.go index f70cdc7a..5d1ce5de 100644 --- a/config.go +++ b/config.go @@ -103,7 +103,7 @@ func validateFrameworkConfiguration() { // Validate Go Runtime config if config.GOMAXPROCS < 0 { - log.Fatal("invalid GOMAXPROCS (must be positive, given %d)", config.GOMAXPROCS) + log.Fatalf("invalid GOMAXPROCS (must be positive, given %d)", config.GOMAXPROCS) } runtime.GOMAXPROCS(config.GOMAXPROCS) diff --git a/conn.go b/conn.go index 8c590c1d..ef701c81 100644 --- a/conn.go +++ b/conn.go @@ -85,7 +85,7 @@ func (c *TimeoutConnection) Read(b []byte) (n int, err error) { // we had to shrink the output buffer AND we used up the whole shrunk size, AND we're not at EOF switch c.ReadLimitExceededAction { case ReadLimitExceededActionTruncate: - logrus.Debug("Truncated read from %d bytes to %d bytes (hit limit of %d bytes)", origSize, n, c.BytesReadLimit) + logrus.Debugf("Truncated read from %d bytes to %d bytes (hit limit of %d bytes)", origSize, n, c.BytesReadLimit) err = io.EOF case ReadLimitExceededActionError: return n, ErrReadLimitExceeded