From 7c00a3a42070b7dd07daf4de2c1b706aaac08a81 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Fri, 6 May 2022 14:43:39 -0500 Subject: [PATCH] :truck: Rename function --- pkg/template/line_comment.go | 4 ++-- pkg/template/line_comment_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/template/line_comment.go b/pkg/template/line_comment.go index 11ca934..a9eb464 100644 --- a/pkg/template/line_comment.go +++ b/pkg/template/line_comment.go @@ -17,7 +17,7 @@ func init() { func RecurseNode(conf config.Config, node *yaml.Node) error { if len(node.Content) == 0 { - if err := TemplateLineComment(conf, node); err != nil { + if err := LineComment(conf, node); err != nil { return err } } else { @@ -30,7 +30,7 @@ func RecurseNode(conf config.Config, node *yaml.Node) error { return nil } -func TemplateLineComment(conf config.Config, node *yaml.Node) error { +func LineComment(conf config.Config, node *yaml.Node) error { if node.LineComment != "" && strings.HasPrefix(node.LineComment, conf.Prefix) { tmpl, err := template.New(""). Funcs(funcMap). diff --git a/pkg/template/line_comment_test.go b/pkg/template/line_comment_test.go index 78d1aa0..2369a71 100644 --- a/pkg/template/line_comment_test.go +++ b/pkg/template/line_comment_test.go @@ -81,7 +81,7 @@ func TestTemplateLineComment(t *testing.T) { LineComment: tt.args.comment, } - if err := TemplateLineComment(tt.args.conf, &node); err != nil { + if err := LineComment(tt.args.conf, &node); err != nil { if (err != nil) != tt.wantErr { t.Errorf("TemplateLineComment() error = %v, wantErr %v", err, tt.wantErr) }