Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-08-02 17:37:28 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-10 21:10:32 +0300
commita93cbb0d6cc6e3a78ba34aa372abc5b41ca24b2c (patch)
treef57fd364a95ef8d87fd9f91d182766ffceafea61 /helpers
parentbd98182dbde893a8a809661c70633741bbf63911 (diff)
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.go2
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)
}
}