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)
}
}
return nil, err
}
- for k, _ := range c.notFound {
+ for k := range c.notFound {
t.transformNotFound[k] = true
}
return nil, err
}
- for k, _ := range c.notFound {
+ for k := range c.notFound {
t.transformNotFound[k] = true
}
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)