diff --git a/render.go b/render.go index 6b389cd..114c51d 100644 --- a/render.go +++ b/render.go @@ -1,4 +1,4 @@ -//go:generate inline -o templates.go -p cdr templates/parts.tmpl +//go:generate inline -o templates.go -p cdr mixtape.tmpl templates/parts.tmpl package cdr @@ -15,7 +15,10 @@ func Render(m *Mixtape, w io.Writer) error { } mixtapeRawTmpl, err := ioutil.ReadFile("mixtape.tmpl") if err != nil { - return err + mixtapeRawTmpl, err = ReadAsset("mixtape.tmpl", false) + if err != nil { + return err + } } t, err := template.New("mixtape").Parse(string(mixtapeRawTmpl) + string(partsRawTmpl)) if err != nil { diff --git a/templates.go b/templates.go index 9677590..1f89389 100644 --- a/templates.go +++ b/templates.go @@ -1,4 +1,4 @@ -// Code generated by "inline -o templates.go -p cdr templates/parts.tmpl" -- DO NOT EDIT -- +// Code generated by "inline -o templates.go -p cdr mixtape.tmpl templates/parts.tmpl" -- DO NOT EDIT -- package cdr @@ -18,6 +18,33 @@ func ReadAsset(file string, useLocal bool) ([]byte, error) { } var files = map[string]string{ + "mixtape.tmpl": `{{define "mixtape"}} + +
+