From 78338ac0298f415f015207741b9f0434773d8246 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 19 Jan 2021 16:48:44 -0800 Subject: [PATCH] types/logger: trim spaces from the rate-limited example message. Signed-off-by: David Anderson --- types/logger/logger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/logger/logger.go b/types/logger/logger.go index dfc9eb07b..9026e4fae 100644 --- a/types/logger/logger.go +++ b/types/logger/logger.go @@ -132,7 +132,7 @@ func RateLimitedFn(logf Logf, f time.Duration, burst int, maxCache int) Logf { logf(format, args...) case warn: // For the warning, log the specific format string - logf("[RATE LIMITED] format string \"%s\" (example: \"%s\")", format, fmt.Sprintf(format, args...)) + logf("[RATE LIMITED] format string \"%s\" (example: \"%s\")", format, strings.TrimSpace(fmt.Sprintf(format, args...))) } } }