File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
pkg/operator/targetconfigcontroller Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -796,25 +796,33 @@ type fakeRecorder struct {
796
796
797
797
func (f * fakeRecorder ) Event (reason , note string ) {
798
798
if f .Events != nil {
799
- f .Events <- fmt .Sprintf (reason + " " + note )
799
+ f .Events <- fmt .Sprintf ("%s %s" , reason , note )
800
800
}
801
801
}
802
802
803
803
func (f * fakeRecorder ) Eventf (reason , note string , args ... interface {}) {
804
804
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
806
810
}
807
811
}
808
812
809
813
func (f * fakeRecorder ) Warning (reason , note string ) {
810
814
if f .Events != nil {
811
- f .Events <- fmt .Sprintf (reason + " " + note )
815
+ f .Events <- fmt .Sprintf ("%s %s" , reason , note )
812
816
}
813
817
}
814
818
815
819
func (f * fakeRecorder ) Warningf (reason , note string , args ... interface {}) {
816
820
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
818
826
}
819
827
}
820
828
You can’t perform that action at this time.
0 commit comments