Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-08-02 17:37:28 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-10 21:10:32 +0300
commita93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c (patch)
treef57fd364a95ef8d87fd9f91d182766ffceafea61 /tpl
parentbd98182dbde893a8a809661c70633741bbf63911 (diff)
Simplify code
- Use bytes.Equal instead of bytes.Compare - Omit range's value where it's unused
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/template.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index cce867ac2..35407722a 100644
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -512,7 +512,7 @@ func (t *htmlTemplates) addTemplateIn(tt *template.Template, name, tpl string) (
return nil, err
}
- for k, _ := range c.notFound {
+ for k := range c.notFound {
t.transformNotFound[k] = true
}
@@ -580,7 +580,7 @@ func (t *textTemplates) addTemplateIn(tt *texttemplate.Template, name, tpl strin
return nil, err
}
- for k, _ := range c.notFound {
+ for k := range c.notFound {
t.transformNotFound[k] = true
}
@@ -637,7 +637,7 @@ func (t *templateHandler) postTransform() error {
return templT.Tree
}, t.text.transformNotFound},
} {
- for name, _ := range s.transformNotFound {
+ for name := range s.transformNotFound {
templ := s.lookup(name)
if templ != nil {
_, err := applyTemplateTransformers(templateUndefined, templ, s.lookup)