From 9728f1cb1fdb9408632ee707fe4febfa375d9d64 Mon Sep 17 00:00:00 2001 From: Mary Frances Hull Date: Sat, 28 Oct 2023 11:07:29 -0700 Subject: [PATCH] update check template link to return html anchor --- pkg/command/checks/command.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/command/checks/command.go b/pkg/command/checks/command.go index e1d36df27..a8426afb2 100644 --- a/pkg/command/checks/command.go +++ b/pkg/command/checks/command.go @@ -5,6 +5,7 @@ import ( "sort" "strings" "text/template" + "fmt" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -14,6 +15,7 @@ import ( "golang.stackrox.io/kube-linter/pkg/command/common" "golang.stackrox.io/kube-linter/pkg/config" "golang.stackrox.io/kube-linter/pkg/templates" + "golang.stackrox.io/kube-linter/internal/consts" ) const ( @@ -116,5 +118,5 @@ func GetTemplateLink(check *config.Check) (string, error) { if !found { return "", errors.Errorf("unexpected: check %v references non-existent template?", check) } - return strings.Join(strings.Fields(strings.ToLower(t.HumanName)), "-"), nil + return fmt.Sprintf(consts.TemplateURLFormat, strings.Join(strings.Fields(strings.ToLower(t.HumanName)), "-")), nil }