hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit c1a2b7a102f314faf1322d7249ec198a0bcb1a62
parent 40efc8677a2923ddd7ab99d29516ad0f5e859c28
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sat, 25 Jul 2015 17:38:13 +0200

Replace strings.Compare

Which is a Go 1.5 func.

See #1299

Diffstat:
Mhugolib/pageSort.go | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git 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()
 	}