Skip to content

Commit

Permalink
Fix golangci-lint govet issues
Browse files Browse the repository at this point in the history
This commit fixes all the errors found by the linter, govet, run by
golangci-lint.

Signed-off-by: Bryan Cox <[email protected]>
  • Loading branch information
bryan-cox committed Jan 23, 2025
1 parent 7e6ca6c commit b4e70b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion etcd-defrag/etcddefrag_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (r *DefragController) runDefrag(ctx context.Context) error {
// Defrag can timeout if defragmentation takes longer than etcdcli.DefragDialTimeout.
r.log.Error(err, "DefragController Defragment Failed", "member", member.Name, "ID", member.ID)
errMsg := fmt.Sprintf("failed defrag on member: %s, memberID: %x: %v", member.Name, member.ID, err)
errs = append(errs, fmt.Errorf(errMsg))
errs = append(errs, fmt.Errorf("%s", errMsg))
continue
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ func (r *HostedClusterReconciler) reconcile(ctx context.Context, req ctrl.Reques
validReleaseImage := meta.FindStatusCondition(hcluster.Status.Conditions, string(hyperv1.ValidReleaseImage))
if validReleaseImage != nil && validReleaseImage.Status == metav1.ConditionFalse {
if validReleaseImage.Reason == hyperv1.SecretNotFoundReason {
return ctrl.Result{}, fmt.Errorf(validReleaseImage.Message)
return ctrl.Result{}, fmt.Errorf("%s", validReleaseImage.Message)
}
log.Error(fmt.Errorf("release image is invalid"), "reconciliation is blocked", "message", validReleaseImage.Message)
return ctrl.Result{}, nil
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/util/eventually.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func EventuallyObject[T client.Object](t *testing.T, ctx context.Context, object
matches = matches || matcher.Matches(condition)
}
if matches {
t.Logf(condition.String())
t.Logf("%s", condition.String())
}
}
}
Expand Down Expand Up @@ -332,7 +332,7 @@ func EventuallyObjects[T client.Object](t *testing.T, ctx context.Context, objec
matches = matches || matcher.Matches(condition)
}
if matches {
t.Logf(condition.String())
t.Logf("%s", condition.String())
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/util/hypershift_framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (h *hypershiftTest) Execute(opts *PlatformAgnosticOptions, platform hyperv1
if err := recover(); err != nil {
// on a panic, print error and mark test as failed so postTeardown() is skipped
// panics from subtests can't be caught by this.
h.Errorf(string(debug.Stack()))
h.Errorf("%s", string(debug.Stack()))
}

h.teardown(hostedCluster, opts, artifactDir, false)
Expand Down

0 comments on commit b4e70b7

Please sign in to comment.