From af9f998a415fb5bfff9e81b47ceae414531d131f Mon Sep 17 00:00:00 2001 From: christinalau0 <91564706+christinalau0@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:54:14 -0700 Subject: [PATCH] chore: remove usage of module autorest/azure, golint fix (#257) --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index d46844a23..295dc96df 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -180,7 +180,7 @@ func (authArgs *authArgs) validateAuthArgs() error { fileName := os.Getenv("AZURE_ENVIRONMENT_FILEPATH") if fileContents, err := os.ReadFile(fileName); err != nil || json.Unmarshal(fileContents, &api.Environment{}) != nil { - return errors.New(fmt.Sprintf("failed to read file or unmarshal JSON from file %s: %v", fileName, err)) + return fmt.Errorf("failed to read file or unmarshal JSON from file %s: %v", fileName, err) } case "AZURECHINACLOUD", "AZUREGERMANCLOUD", "AZUREPUBLICCLOUD", "AZUREUSGOVERNMENTCLOUD": // Known environment, no action needed