From e007c9b25d076f5705afb63fda4f3abd3d05b7b8 Mon Sep 17 00:00:00 2001 From: bep Date: Sat, 7 Mar 2015 12:53:20 +0100 Subject: hugolib: apply some more Golint rules --- hugolib/pagination.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hugolib/pagination.go') 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.") } -- cgit v1.2.3