printer/templateprinter.go
changeset 41 909c3ddd83f6
parent 40 ad148f60dc87
child 49 d6b4e3b7c6c6
--- a/printer/templateprinter.go	Sun Apr 30 18:17:10 2017 +0200
+++ b/printer/templateprinter.go	Sun Apr 30 18:43:11 2017 +0200
@@ -28,7 +28,10 @@
 // For TemplatePrinter, the option parameter contains the template string.
 func NewPrinterTemplate(option string) (*TemplatePrinter, error) {
 	tmpl := option
-	t, err := template.New("output").Funcs(template.FuncMap{"fromhtml": html2string}).Parse(tmpl)
+	t, err := template.New("output").Funcs(template.FuncMap{
+		"fromhtml": html2string,
+		"fromunix": unix2string,
+	}).Parse(tmpl)
 	if err != nil {
 		return nil, err
 	}