From e91c4c3337d3bf3fdad8de1763999a5c3325567f Mon Sep 17 00:00:00 2001 From: John Norwood Date: Sun, 3 Apr 2022 16:31:26 +0100 Subject: [PATCH] Don't print angle brackets for URL/email if not present --- pkg/document/template.go | 2 +- pkg/util/ignore.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/document/template.go b/pkg/document/template.go index c6540c2..cbe5171 100644 --- a/pkg/document/template.go +++ b/pkg/document/template.go @@ -129,7 +129,7 @@ func getMaintainersTemplate() string { maintainerBuilder.WriteString("| Name | Email | Url |\n") maintainerBuilder.WriteString("| ---- | ------ | --- |\n") maintainerBuilder.WriteString(" {{- range .Maintainers }}") - maintainerBuilder.WriteString("\n| {{ .Name }} | <{{ .Email }}> | <{{ .Url }}> |") + maintainerBuilder.WriteString("\n| {{ .Name }} | {{ if .Email }}<{{ .Email }}>{{ end }} | {{ if .Url }}<{{ .Url }}>{{ end }} |") maintainerBuilder.WriteString(" {{- end }}") maintainerBuilder.WriteString("{{ end }}") diff --git a/pkg/util/ignore.go b/pkg/util/ignore.go index 13de8c2..c957c27 100644 --- a/pkg/util/ignore.go +++ b/pkg/util/ignore.go @@ -36,6 +36,7 @@ func parseIgnoreFilePathToRules(filename string) (*ignore.Rules, error) { return nil, fmt.Errorf("failed to parse ignore rules from file %s: %s", filename, err) } + log.Debugf("Found ignore file at %s, using those ignore rules", filename) return ignoreRules, nil }