diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-07 12:53:20 +0100 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-07 12:53:20 +0100 |
commit | e007c9b25d076f5705afb63fda4f3abd3d05b7b8 (patch) | |
tree | d0fe0ef5f1079a304fff0689e3d1d04841b98455 /hugolib/pagination.go | |
parent | 5759007874afc1948f0fab0a97f2184bff686b54 (diff) |
hugolib: apply some more Golint rules
Diffstat (limited to 'hugolib/pagination.go')
-rw-r--r-- | hugolib/pagination.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hugolib/pagination.go b/hugolib/pagination.go index 8fb4f4e4a..55d7104b6 100644 --- a/hugolib/pagination.go +++ b/hugolib/pagination.go @@ -131,7 +131,7 @@ func splitPages(pages Pages, size int) []Pages { return split } -// Paginate gets this Node's paginator if it's already created. +// Paginator gets this Node's paginator if it's already created. // If it's not, one will be created with all pages in Data["Pages"]. func (n *Node) Paginator() (*pager, error) { @@ -163,9 +163,12 @@ func (n *Node) Paginator() (*pager, error) { return n.paginator, nil } +// Paginator on Page isn't supported, calling this yields an error. func (p *Page) Paginator() (*pager, error) { return nil, errors.New("Paginators not supported for content pages.") } + +// Paginate on Page isn't supported, calling this yields an error. func (p *Page) Paginate(seq interface{}) (*pager, error) { return nil, errors.New("Paginators not supported for content pages.") } |