printer/templateprinter.go
changeset 49 d6b4e3b7c6c6
parent 41 909c3ddd83f6
child 50 c6adf9d9e996
--- a/printer/templateprinter.go	Mon May 01 06:35:28 2017 +0000
+++ b/printer/templateprinter.go	Mon May 01 12:25:43 2017 +0200
@@ -16,6 +16,7 @@
 	"github.com/m0t0k1ch1/gomif"
 
 	"github.com/McKael/madon"
+	"github.com/McKael/madonctl/printer/colors"
 )
 
 // TemplatePrinter represents a Template printer
@@ -31,6 +32,7 @@
 	t, err := template.New("output").Funcs(template.FuncMap{
 		"fromhtml": html2string,
 		"fromunix": unix2string,
+		"color":    colors.ANSICodeString,
 	}).Parse(tmpl)
 	if err != nil {
 		return nil, err