Skip to content

Commit 2760f86

Browse files
Jillek8s-publishing-bot
authored andcommittedSep 25, 2021
Fix double formatting on error message
fmt.Errorf() was called with a message rather than a format string Kubernetes-commit: 4c038d387c081c2a1a222adb76cbc2b0750fa520
1 parent 8b9d281 commit 2760f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (c *Controller) syncHandler(key string) error {
289289
if !metav1.IsControlledBy(deployment, foo) {
290290
msg := fmt.Sprintf(MessageResourceExists, deployment.Name)
291291
c.recorder.Event(foo, corev1.EventTypeWarning, ErrResourceExists, msg)
292-
return fmt.Errorf(msg)
292+
return fmt.Errorf("%s", msg)
293293
}
294294

295295
// If this number of the replicas on the Foo resource is specified, and the

0 commit comments

Comments
 (0)
Failed to load comments.