Skip to content

Commit

Permalink
Fix golangci-lint findings
Browse files Browse the repository at this point in the history
Finding: printf: non-constant format string in call to fmt.Errorf (govet)

Use `errors.New` instead of `fmt.Errorf` without formatting.

Signed-off-by: Matthias Diester <[email protected]>
  • Loading branch information
HeavyWombat committed Sep 2, 2024
1 parent 5fb30ef commit 466b325
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/shp/cmd/follower/follow.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package follower
import (
"context"
"encoding/json"
"errors"
"fmt"
"strings"
"sync"
Expand Down Expand Up @@ -201,7 +202,7 @@ func (f *Follower) OnEvent(pod *corev1.Pod) error {
for _, c := range pod.Status.Conditions {
if c.Type == corev1.PodInitialized || c.Type == corev1.ContainersReady {
if c.Status == corev1.ConditionUnknown {
return fmt.Errorf(c.Message)
return errors.New(c.Message)
}
}
}
Expand Down

0 comments on commit 466b325

Please sign in to comment.