summaryrefslogtreecommitdiffstats
path: root/tpl/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/template.go')
-rw-r--r--tpl/template.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/tpl/template.go b/tpl/template.go
index 0841236de..b9b0749b6 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -30,9 +30,7 @@ type TemplateManager interface {
TemplateFuncGetter
AddTemplate(name, tpl string) error
AddLateTemplate(name, tpl string) error
- LoadTemplates(prefix string) error
-
- RebuildClone()
+ MarkReady() error
}
// TemplateVariants describes the possible variants of a template.
@@ -52,6 +50,8 @@ type TemplateFinder interface {
type TemplateHandler interface {
TemplateFinder
Execute(t Template, wr io.Writer, data interface{}) error
+ LookupLayout(d output.LayoutDescriptor, f output.Format) (Template, bool, error)
+ HasTemplate(name string) bool
}
type TemplateLookup interface {
@@ -105,6 +105,12 @@ type templateInfoManager struct {
InfoManager
}
+// TemplatesProvider as implemented by deps.Deps.
+type TemplatesProvider interface {
+ Tmpl() TemplateHandler
+ TextTmpl() TemplateParseFinder
+}
+
// WithInfo wraps the info in a template.
func WithInfo(templ Template, info Info) Template {
if manager, ok := info.(InfoManager); ok {