mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Simplify code
- Use bytes.Equal instead of bytes.Compare - Omit range's value where it's unused
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
bd98182dbd
commit
a93cbb0d6c
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user