diff options
author | Christian Muehlhaeuser <[email protected]> | 2019-08-02 14:37:28 +0000 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-08-10 20:10:32 +0200 |
commit | a93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c (patch) | |
tree | f57fd364a95ef8d87fd9f91d182766ffceafea61 /helpers | |
parent | bd98182dbde893a8a809661c70633741bbf63911 (diff) | |
download | hugo-a93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c.tar.gz hugo-a93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c.zip |
Simplify code
- Use bytes.Equal instead of bytes.Compare
- Omit range's value where it's unused
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/content_test.go | 2 |
1 files changed, 1 insertions, 1 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) } } |