From ddf2aef699c7acd3ca8ace8ec4e6d9d2a16d50df Mon Sep 17 00:00:00 2001 From: batphonghan Date: Thu, 2 Nov 2023 23:28:48 +0700 Subject: [PATCH] Refactor --- .golangci.yml | 1 - shared/services/stader/client.go | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b22558863..ea37d62ab 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -45,7 +45,6 @@ linters: - prealloc - predeclared - revive - - stylecheck - thelper - tparallel - typecheck diff --git a/shared/services/stader/client.go b/shared/services/stader/client.go index 403457155..346087dd2 100644 --- a/shared/services/stader/client.go +++ b/shared/services/stader/client.go @@ -798,18 +798,18 @@ func (c *Client) UpdateGuardianConfiguration(contents []byte) error { guardianTemplatePath, err := homedir.Expand(fmt.Sprintf("%s/%s/%s", c.configPath, templatesDir, GuardianFileTemplate)) if err != nil { - return fmt.Errorf("Error expanding Guardian template path: %w", err) + return fmt.Errorf("error expanding Guardian template path: %w", err) } guardianConfigPath, err := homedir.Expand(fmt.Sprintf("%s/%s", c.configPath, GuardianFile)) if err != nil { - return fmt.Errorf("Error expanding guardian config file path: %w", err) + return fmt.Errorf("error expanding guardian config file path: %w", err) } // Write the actual Prometheus config file err = os.WriteFile(guardianTemplatePath, contents, 0664) if err != nil { - return fmt.Errorf("Could not write guardian config file to %s: %w", shellescape.Quote(guardianConfigPath), err) + return fmt.Errorf("could not write guardian config file to %s: %w", shellescape.Quote(guardianConfigPath), err) } return nil