mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
hugolib: Add missing GoDoc in pagination.go
This commit is contained in:
@@ -26,6 +26,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Pager represents one of the elements in a paginator.
|
||||||
|
// The number, starting on 1, represents its place.
|
||||||
type Pager struct {
|
type Pager struct {
|
||||||
number int
|
number int
|
||||||
*paginator
|
*paginator
|
||||||
@@ -35,10 +37,12 @@ type paginatedElement interface {
|
|||||||
Len() int
|
Len() int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Len returns the number of pages in the list.
|
||||||
func (p Pages) Len() int {
|
func (p Pages) Len() int {
|
||||||
return len(p)
|
return len(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Len returns the number of pages in the page group.
|
||||||
func (psg PagesGroup) Len() int {
|
func (psg PagesGroup) Len() int {
|
||||||
l := 0
|
l := 0
|
||||||
for _, pg := range psg {
|
for _, pg := range psg {
|
||||||
@@ -234,7 +238,7 @@ func splitPageGroups(pageGroups PagesGroup, size int) []paginatedElement {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
pg PagesGroup
|
pg PagesGroup
|
||||||
key interface{} = nil
|
key interface{}
|
||||||
groupIndex = -1
|
groupIndex = -1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user