From ee70c9d145222bb7aba8cb43d211260846ff8d7f Mon Sep 17 00:00:00 2001 From: Raphael Silva Date: Thu, 4 Jul 2024 23:24:38 +0000 Subject: [PATCH] Fix linting error Signed-off-by: Raphael Silva --- web/api/v1/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/api/v1/api.go b/web/api/v1/api.go index ab89fbb3c5..9f683cd0bc 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -16,6 +16,7 @@ package v1 import ( "context" "crypto/sha1" + "encoding/hex" "errors" "fmt" "math" @@ -1595,7 +1596,7 @@ func parseListRulesPaginationRequest(r *http.Request) (*listRulesPaginationReque func getRuleGroupNextToken(file, group string) string { h := sha1.New() h.Write([]byte(file + ";" + group)) - return fmt.Sprintf("%x", h.Sum(nil)) + return hex.EncodeToString(h.Sum(nil)) } type prometheusConfig struct {