Skip to content

Commit 20ae0ed

Browse files
committed
Fix warnings
1 parent 3700109 commit 20ae0ed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/apply/mutator/apply_time_mutator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func computeStatus(obj *unstructured.Unstructured) cache.ResourceStatus {
229229
if err != nil {
230230
if klog.V(3).Enabled() {
231231
ref := mutation.ResourceReferenceFromUnstructured(obj)
232-
klog.Info("failed to compute object status (%s): %d", ref, err)
232+
klog.Infof("failed to compute object status (%s): %d", ref, err)
233233
}
234234
return cache.ResourceStatus{
235235
Resource: obj,

pkg/jsonpath/jsonpath.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func Get(obj map[string]interface{}, expression string) ([]interface{}, error) {
2828
return nil, fmt.Errorf("failed to marshal input to json: %w", err)
2929
}
3030

31-
klog.V(7).Info("jsonpath.Get input as json:\n%s", jsonBytes)
31+
klog.V(7).Infof("jsonpath.Get input as json:\n%s", jsonBytes)
3232

3333
// parse json into an ajson node
3434
root, err := ajson.Unmarshal(jsonBytes)
@@ -52,7 +52,7 @@ func Get(obj map[string]interface{}, expression string) ([]interface{}, error) {
5252
return nil, fmt.Errorf("failed to marshal jsonpath result to json: %w", err)
5353
}
5454

55-
klog.V(7).Info("jsonpath.Get output as json:\n%s", jsonBytes)
55+
klog.V(7).Infof("jsonpath.Get output as json:\n%s", jsonBytes)
5656

5757
// parse json back into a Go primitive
5858
var value interface{}
@@ -77,7 +77,7 @@ func Set(obj map[string]interface{}, expression string, value interface{}) (int,
7777
return 0, fmt.Errorf("failed to marshal input to json: %w", err)
7878
}
7979

80-
klog.V(7).Info("jsonpath.Set input as json:\n%s", jsonBytes)
80+
klog.V(7).Infof("jsonpath.Set input as json:\n%s", jsonBytes)
8181

8282
// parse json into an ajson node
8383
root, err := ajson.Unmarshal(jsonBytes)
@@ -138,7 +138,7 @@ func Set(obj map[string]interface{}, expression string, value interface{}) (int,
138138
return 0, fmt.Errorf("failed to marshal jsonpath result to json: %w", err)
139139
}
140140

141-
klog.V(7).Info("jsonpath.Set output as json:\n%s", jsonBytes)
141+
klog.V(7).Infof("jsonpath.Set output as json:\n%s", jsonBytes)
142142

143143
// parse json back into the input map
144144
err = yaml.Unmarshal(jsonBytes, &obj)

pkg/kstatus/watcher/object_status_reporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ func (w *ObjectStatusReporter) newStatusCheckTaskFunc(
693693
id object.ObjMetadata,
694694
) taskFunc {
695695
return func() {
696-
klog.V(5).Infof("Re-reading object status: %s", status.ScheduleWindow, id)
696+
klog.V(5).Infof("Re-reading object status: %v", id)
697697
// check again
698698
rs, err := w.readStatusFromCluster(ctx, id)
699699
if err != nil {

0 commit comments

Comments
 (0)