Skip to content

Commit 226bdda

Browse files
authored
Merge pull request #1955 from destinyoooo/master
fix: format string issues
2 parents d0a22b7 + cc8fc75 commit 226bdda

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pkg/controller/chi/worker-deleter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ func (w *worker) hasHostVolumesToRetain(ctx context.Context, host *api.Host) (ha
382382
// Check whether among all PVCs host has reclaim policy "retain" specified
383383
storage.NewStoragePVC(w.c.kube.Storage()).WalkDiscoveredPVCs(ctx, host, func(pvc *core.PersistentVolumeClaim) {
384384
if chiLabeler.New(nil).GetReclaimPolicy(pvc.GetObjectMeta()) == api.PVCReclaimPolicyRetain {
385-
w.a.V(1).F().Info("PVC: %s/%s blocks drop replica. Reclaim policy: %s", api.PVCReclaimPolicyRetain.String())
385+
w.a.V(1).F().Info("PVC: %s/%s blocks drop replica. Reclaim policy: %s", pvc.Namespace, pvc.Name, api.PVCReclaimPolicyRetain.String())
386386
has = true
387387
}
388388
})

pkg/controller/chi/worker-service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (w *worker) updateService(
181181
M(cr).F().
182182
Info("Update Service success: %s", util.NamespaceNameString(newService))
183183
} else {
184-
w.a.M(cr).F().Error("Update Service fail: %s failed with error: %v", util.NamespaceNameString(newService))
184+
w.a.M(cr).F().Error("Update Service fail: %s failed with error: %v", util.NamespaceNameString(newService), err)
185185
}
186186

187187
return err

pkg/controller/chk/worker-service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (w *worker) updateService(
181181
M(cr).F().
182182
Info("Update Service success: %s", util.NamespaceNameString(newService))
183183
} else {
184-
w.a.M(cr).F().Error("Update Service fail: %s failed with error: %v", util.NamespaceNameString(newService))
184+
w.a.M(cr).F().Error("Update Service fail: %s failed with error: %v", util.NamespaceNameString(newService), err)
185185
}
186186

187187
return err

pkg/model/k8s/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func ServiceSpecVerifyPorts(spec *core.ServiceSpec) error {
2727
for i := range spec.Ports {
2828
servicePort := &spec.Ports[i]
2929
if types.IsPortInvalid(servicePort.Port) {
30-
return fmt.Errorf(fmt.Sprintf("incorrect port :%d", servicePort.Port))
30+
return fmt.Errorf("incorrect port :%d", servicePort.Port)
3131
}
3232
}
3333
return nil

0 commit comments

Comments
 (0)