From e33055e881656dcee9add78dd6c495e1a55811c1 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Sun, 19 Jan 2025 16:33:18 -0800 Subject: [PATCH] [chore] use errors.New unless there is interpolation --- cmd/gather/cluster/cluster.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/gather/cluster/cluster.go b/cmd/gather/cluster/cluster.go index 3d289fb6ae..19f33e1fc7 100644 --- a/cmd/gather/cluster/cluster.go +++ b/cmd/gather/cluster/cluster.go @@ -16,6 +16,7 @@ package cluster import ( "context" + "errors" "fmt" "log" "os" @@ -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