summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2015-07-25 17:38:13 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2015-07-25 17:38:13 +0200
commitc1a2b7a102f314faf1322d7249ec198a0bcb1a62 (patch)
tree713f7ec6619a6fad567d605462ff99142f44e23d /hugolib
parent40efc8677a2923ddd7ab99d29516ad0f5e859c28 (diff)
Replace strings.Compare
Which is a Go 1.5 func. See #1299
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/pageSort.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/hugolib/pageSort.go b/hugolib/pageSort.go
index 99c01f630..ec62ca7e5 100644
--- a/hugolib/pageSort.go
+++ b/hugolib/pageSort.go
@@ -15,7 +15,6 @@ package hugolib
import (
"sort"
- "strings"
)
var spc = newPageCache()
@@ -44,7 +43,7 @@ func (by PageBy) Sort(pages Pages) {
var DefaultPageSort = func(p1, p2 *Page) bool {
if p1.Weight == p2.Weight {
if p1.Date.Unix() == p2.Date.Unix() {
- return strings.Compare(p1.LinkTitle(), p2.LinkTitle()) == -1
+ return (p1.LinkTitle() < p2.LinkTitle())
}
return p1.Date.Unix() > p2.Date.Unix()
}