From 231e6a834a9b3ced5dd54013354f1a450eda3629 Mon Sep 17 00:00:00 2001 From: pashakostohrys Date: Wed, 13 Dec 2023 16:45:03 +0200 Subject: [PATCH] fix linter --- event_reporter/application/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/event_reporter/application/client.go b/event_reporter/application/client.go index 6eef4babb6e45..e0212e902953a 100644 --- a/event_reporter/application/client.go +++ b/event_reporter/application/client.go @@ -3,7 +3,6 @@ package application import ( "context" "encoding/json" - "errors" "fmt" appclient "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" @@ -68,7 +67,7 @@ func (c *httpApplicationClient) execute(ctx context.Context, url string, result isStatusOK := res.StatusCode >= 200 && res.StatusCode < 300 if !isStatusOK { - return errors.New(fmt.Sprintf("argocd server respond with code %d, msg is: %s", res.StatusCode, string(b))) + return fmt.Errorf("argocd server respond with code %d, msg is: %s", res.StatusCode, string(b)) } err = json.Unmarshal(b, &result)