changeset 85 | a4464c0b0c36 |
parent 83 | 57afac822019 |
child 89 | 3758bb5f0979 |
--- a/printer/templateprinter.go Sun May 07 14:12:56 2017 +0200 +++ b/printer/templateprinter.go Sun May 07 16:38:52 2017 +0200 @@ -36,6 +36,9 @@ // For TemplatePrinter, the options parameter contains the template string. func NewPrinterTemplate(options Options) (*TemplatePrinter, error) { tmpl := options["template"] + if tmpl == "" { + return nil, fmt.Errorf("empty template") + } t, err := template.New("output").Funcs(template.FuncMap{ "fromhtml": html2string, "fromunix": unix2string,