Skip to content

Commit

Permalink
[chore] use errors.New unless there is interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Jan 20, 2025
1 parent a36367b commit e33055e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/gather/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cluster

import (
"context"
"errors"
"fmt"
"log"
"os"
Expand Down Expand Up @@ -82,7 +83,7 @@ func (c *Cluster) getOperatorDeployment() (appsv1.Deployment, error) {
}

if len(operatorDeployments.Items) == 0 {
return appsv1.Deployment{}, fmt.Errorf("operator not found")
return appsv1.Deployment{}, errors.New("operator not found")
}

return operatorDeployments.Items[0], nil
Expand Down

0 comments on commit e33055e

Please sign in to comment.