summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl/template.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /tpl/tplimpl/template.go
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'tpl/tplimpl/template.go')
-rw-r--r--tpl/tplimpl/template.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index e3a4ce090..eb91ab837 100644
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -167,7 +167,6 @@ func newTemplateExec(d *deps.Deps) (*templateExec, error) {
if d.WithTemplate != nil {
if err := d.WithTemplate(e); err != nil {
return nil, err
-
}
}
@@ -246,7 +245,6 @@ func (t *templateExec) MarkReady() error {
})
return err
-
}
type templateHandler struct {
@@ -345,7 +343,6 @@ func (t *templateHandler) LookupVariant(name string, variants tpl.TemplateVarian
more := len(s.variants) > 1
return sv.ts, true, more
-
}
// LookupVariants returns all variants of name, nil if none found.
@@ -362,11 +359,9 @@ func (t *templateHandler) LookupVariants(name string) []tpl.Template {
}
return variants
-
}
func (t *templateHandler) HasTemplate(name string) bool {
-
if _, found := t.baseof[name]; found {
return true
}
@@ -501,7 +496,6 @@ func (t *templateHandler) addFileContext(templ tpl.Template, inerr error) error
err, _ := checkFilename(ts.baseInfo, inerr)
return err
-
}
func (t *templateHandler) addShortcodeVariant(ts *templateState) {
@@ -584,7 +578,6 @@ func (t *templateHandler) addTemplateFile(name, path string) error {
t.applyTemplateTransformers(t.main, templ)
return nil
-
}
func (t *templateHandler) addTemplateTo(info templateInfo, to *templateNamespace) (*templateState, error) {
@@ -716,7 +709,6 @@ func (t *templateHandler) loadTemplates() error {
}
return nil
-
}
func (t *templateHandler) nameIsText(name string) (string, bool) {
@@ -763,7 +755,6 @@ func (t *templateHandler) extractPartials(templ tpl.Template) error {
}
return nil
-
}
func (t *templateHandler) postTransform() error {
@@ -874,7 +865,6 @@ func (t *templateNamespace) newTemplateLookup(in *templateState) func(name strin
return newTemplateState(templ, templateInfo{name: templ.Name()})
}
return nil
-
}
}
@@ -933,7 +923,6 @@ func (t *templateState) isText() bool {
func isText(templ tpl.Template) bool {
_, isText := templ.(*texttemplate.Template)
return isText
-
}
type templateStateMap struct {
@@ -1003,7 +992,6 @@ func removeLeadingBOM(s string) string {
}
return s
-
}
// resolves _internal/shortcodes/param.html => param.html etc.
@@ -1015,7 +1003,6 @@ func templateBaseName(typ templateType, name string) string {
default:
panic("not implemented")
}
-
}
func unwrap(templ tpl.Template) tpl.Template {
@@ -1041,5 +1028,4 @@ func templates(in tpl.Template) []tpl.Template {
}
return templs
-
}