From a93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 2 Aug 2019 14:37:28 +0000 Subject: Simplify code - Use bytes.Equal instead of bytes.Compare - Omit range's value where it's unused --- helpers/content_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helpers') 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) } } -- cgit v1.2.3