Skip to content

Commit a8aab77

Browse files
committed
bump(k8s): fitting
1 parent c6f39db commit a8aab77

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

pkg/operator/targetconfigcontroller/targetconfigcontroller_test.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,25 +796,33 @@ type fakeRecorder struct {
796796

797797
func (f *fakeRecorder) Event(reason, note string) {
798798
if f.Events != nil {
799-
f.Events <- fmt.Sprintf(reason + " " + note)
799+
f.Events <- fmt.Sprintf("%s %s", reason, note)
800800
}
801801
}
802802

803803
func (f *fakeRecorder) Eventf(reason, note string, args ...interface{}) {
804804
if f.Events != nil {
805-
f.Events <- fmt.Sprintf(reason+" "+note, args...)
805+
msg := fmt.Sprintf("%s %s", reason, note)
806+
if len(args) > 0 {
807+
msg += " " + fmt.Sprint(args...)
808+
}
809+
f.Events <- msg
806810
}
807811
}
808812

809813
func (f *fakeRecorder) Warning(reason, note string) {
810814
if f.Events != nil {
811-
f.Events <- fmt.Sprintf(reason + " " + note)
815+
f.Events <- fmt.Sprintf("%s %s", reason, note)
812816
}
813817
}
814818

815819
func (f *fakeRecorder) Warningf(reason, note string, args ...interface{}) {
816820
if f.Events != nil {
817-
f.Events <- fmt.Sprintf(reason+" "+note, args...)
821+
msg := fmt.Sprintf("%s %s", reason, note)
822+
if len(args) > 0 {
823+
msg += " " + fmt.Sprint(args...)
824+
}
825+
f.Events <- msg
818826
}
819827
}
820828

0 commit comments

Comments
 (0)