From 2760f8658e0c8212e5cd6db0fdca7711bcf76269 Mon Sep 17 00:00:00 2001 From: Jille Timmermans Date: Sat, 25 Sep 2021 09:51:48 +0200 Subject: [PATCH] Fix double formatting on error message fmt.Errorf() was called with a message rather than a format string Kubernetes-commit: 4c038d387c081c2a1a222adb76cbc2b0750fa520 --- controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller.go b/controller.go index f279db5d..82611e95 100644 --- a/controller.go +++ b/controller.go @@ -289,7 +289,7 @@ func (c *Controller) syncHandler(key string) error { if !metav1.IsControlledBy(deployment, foo) { msg := fmt.Sprintf(MessageResourceExists, deployment.Name) c.recorder.Event(foo, corev1.EventTypeWarning, ErrResourceExists, msg) - return fmt.Errorf(msg) + return fmt.Errorf("%s", msg) } // If this number of the replicas on the Foo resource is specified, and the