package
Version:
v0.0.0-...-ebdf1d9
Opens a new window with list of versions in this module.
Published: Sep 21, 2018
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 23
Opens a new window with list of known importers.
Documentation
¶
Package pagination assists with navigating between pages of results.
Map returns a template.FuncMap PAGINATION which makes it easy to navigate
between pages of results.
type Info struct {
Page int
TotalPages int
PerPage int
Offset int
}
Info holds the pagination fields.
New returns a pagination struct.
func (i *Info) CalculatePages(itemTotal int)
CalculatePages calculates the number of pages by passing in the item total.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.