add "comment" template filter to comment out multiline statements

This commit is contained in:
Cory Bennett
2015-09-14 12:29:30 -07:00
parent 5d8dc9f9d8
commit ae285b5a55
+3
View File
@@ -132,6 +132,9 @@ func runTemplate(templateContent string, data interface{}, out io.Writer) error
}
return strings.Replace(content, "\n", string(indent), -1)
},
"comment": func(content string) string {
return strings.Replace(content, "\n", "\n# ", -1)
},
"color": func(color string) string {
return ansi.ColorCode(color)
},