summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helpers/content_test.go2
-rw-r--r--tpl/tplimpl/template.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/helpers/content_test.go b/helpers/content_test.go
index 04e9466d0..011d606e6 100644
--- a/helpers/content_test.go
+++ b/helpers/content_test.go
@@ -45,7 +45,7 @@ func TestTrimShortHTML(t *testing.T) {
c := newTestContentSpec()
for i, test := range tests {
output := c.TrimShortHTML(test.input)
- if bytes.Compare(test.output, output) != 0 {
+ if !bytes.Equal(test.output, output) {
t.Errorf("Test %d failed. Expected %q got %q", i, test.output, output)
}
}
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)