diff options
Diffstat (limited to 'resources/page/pages_sort.go')
-rw-r--r-- | resources/page/pages_sort.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/resources/page/pages_sort.go b/resources/page/pages_sort.go index 85817ffda..644f67e1e 100644 --- a/resources/page/pages_sort.go +++ b/resources/page/pages_sort.go @@ -96,7 +96,6 @@ var ( } lessPageLanguage = func(p1, p2 Page) bool { - if p1.Language().Weight == p2.Language().Weight { if p1.Date().Unix() == p2.Date().Unix() { c := compare.Strings(p1.LinkTitle(), p2.LinkTitle()) @@ -174,7 +173,6 @@ func SortByDefault(pages Pages) { // // This may safely be executed in parallel. func (p Pages) ByTitle() Pages { - const key = "pageSort.ByTitle" pages, _ := spc.get(key, pageBy(lessPageTitle).Sort, p) @@ -187,7 +185,6 @@ func (p Pages) ByTitle() Pages { // // This may safely be executed in parallel. func (p Pages) ByLinkTitle() Pages { - const key = "pageSort.ByLinkTitle" pages, _ := spc.get(key, pageBy(lessPageLinkTitle).Sort, p) @@ -201,7 +198,6 @@ func (p Pages) ByLinkTitle() Pages { // // This may safely be executed in parallel. func (p Pages) ByDate() Pages { - const key = "pageSort.ByDate" pages, _ := spc.get(key, pageBy(lessPageDate).Sort, p) @@ -215,7 +211,6 @@ func (p Pages) ByDate() Pages { // // This may safely be executed in parallel. func (p Pages) ByPublishDate() Pages { - const key = "pageSort.ByPublishDate" pages, _ := spc.get(key, pageBy(lessPagePubDate).Sort, p) @@ -229,7 +224,6 @@ func (p Pages) ByPublishDate() Pages { // // This may safely be executed in parallel. func (p Pages) ByExpiryDate() Pages { - const key = "pageSort.ByExpiryDate" expDate := func(p1, p2 Page) bool { @@ -247,7 +241,6 @@ func (p Pages) ByExpiryDate() Pages { // // This may safely be executed in parallel. func (p Pages) ByLastmod() Pages { - const key = "pageSort.ByLastmod" date := func(p1, p2 Page) bool { @@ -265,11 +258,9 @@ func (p Pages) ByLastmod() Pages { // // This may safely be executed in parallel. func (p Pages) ByLength() Pages { - const key = "pageSort.ByLength" length := func(p1, p2 Page) bool { - p1l, ok1 := p1.(resource.LengthProvider) p2l, ok2 := p2.(resource.LengthProvider) @@ -295,7 +286,6 @@ func (p Pages) ByLength() Pages { // // This may safely be executed in parallel. func (p Pages) ByLanguage() Pages { - const key = "pageSort.ByLanguage" pages, _ := spc.get(key, pageBy(lessPageLanguage).Sort, p) @@ -365,7 +355,6 @@ func (p Pages) ByParam(paramsKey interface{}) Pages { s2 := cast.ToString(v2) return compare.LessStrings(s1, s2) - } pages, _ := spc.get(key, pageBy(paramsKeyComparator).Sort, p) |