diff --git a/cmd/kops/create_cluster_test.go b/cmd/kops/create_cluster_test.go index 483b61303f4a4..d31e85fd24fe6 100644 --- a/cmd/kops/create_cluster_test.go +++ b/cmd/kops/create_cluster_test.go @@ -37,7 +37,7 @@ func checkParse(t *testing.T, s string, expect map[string]string, shouldErr bool if shouldErr { return } - t.Errorf(err.Error()) + t.Errorf("%s", err.Error()) } for k, v := range expect { diff --git a/pkg/k8scodecs/codecs_test.go b/pkg/k8scodecs/codecs_test.go index 04a5bfcd0f9d0..14781c4da0fa9 100644 --- a/pkg/k8scodecs/codecs_test.go +++ b/pkg/k8scodecs/codecs_test.go @@ -74,7 +74,7 @@ func TestToVersionedYaml(t *testing.T) { actual = strings.TrimSpace(actual) expected := strings.TrimSpace(g.expected) if actual != expected { - t.Logf(diff.FormatDiff(actual, expected)) + t.Log(diff.FormatDiff(actual, expected)) t.Errorf("actual != expected") continue } diff --git a/pkg/kopscodecs/codecs_test.go b/pkg/kopscodecs/codecs_test.go index 040f32bdfc41a..e5a018ba090aa 100644 --- a/pkg/kopscodecs/codecs_test.go +++ b/pkg/kopscodecs/codecs_test.go @@ -68,7 +68,7 @@ func TestToVersionedYaml(t *testing.T) { actual = strings.TrimSpace(actual) expected := strings.TrimSpace(g.expected) if actual != expected { - t.Logf(diff.FormatDiff(actual, expected)) + t.Log(diff.FormatDiff(actual, expected)) t.Errorf("actual != expected") continue } @@ -102,7 +102,7 @@ func TestToVersionedJSON(t *testing.T) { actual := string(actualBytes) actual = strings.TrimSpace(actual) if actual != g.expected { - t.Logf(diff.FormatDiff(actual, g.expected)) + t.Log(diff.FormatDiff(actual, g.expected)) t.Errorf("actual != expected") continue } diff --git a/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go b/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go index 1bade62278587..b14974e8bb358 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go +++ b/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go @@ -441,8 +441,8 @@ func matches(l, r *compute.InstanceTemplate) bool { if klog.V(10).Enabled() { ls := fi.DebugAsJsonStringIndent(normalizedL) rs := fi.DebugAsJsonStringIndent(normalizedR) - klog.V(10).Infof("Not equal") - klog.V(10).Infof(diff.FormatDiff(ls, rs)) + klog.V(10).Info("Not equal") + klog.V(10).Info(diff.FormatDiff(ls, rs)) } return false } diff --git a/upup/pkg/fi/cloudup/scaleway/utils.go b/upup/pkg/fi/cloudup/scaleway/utils.go index 5390164f5ff6a..ff25c3a0bbe6c 100644 --- a/upup/pkg/fi/cloudup/scaleway/utils.go +++ b/upup/pkg/fi/cloudup/scaleway/utils.go @@ -165,7 +165,7 @@ func CreateValidScalewayProfile() (*scw.Profile, error) { } else { errMsg += " in a Scaleway profile or as an environment variable" } - return nil, fmt.Errorf(errMsg) + return nil, fmt.Errorf("%s", errMsg) } return &profile, nil diff --git a/upup/pkg/fi/executor.go b/upup/pkg/fi/executor.go index 32d62e474fb03..dc2f12ac40f70 100644 --- a/upup/pkg/fi/executor.go +++ b/upup/pkg/fi/executor.go @@ -127,7 +127,7 @@ func (e *executor[T]) RunTasks(ctx context.Context, taskMap map[string]Task[T]) if err != nil { // print warning message and continue like the task succeeded if _, ok := err.(*ExistsAndWarnIfChangesError); ok { - klog.Warningf(err.Error()) + klog.Warning(err.Error()) ts.done = true ts.lastError = nil progress = true