Skip to content

Commit

Permalink
🚚 Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed May 6, 2022
1 parent b07e180 commit 7c00a3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/template/line_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion pkg/template/line_comment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 7c00a3a

Please sign in to comment.