MCPcopy
hub / github.com/gofiber/fiber / NewPageInfo

Function NewPageInfo

middleware/paginate/page_info.go:53–60  ·  view source on GitHub ↗

NewPageInfo creates a new PageInfo.

(page, limit, offset int, sort []SortField)

Source from the content-addressed store, hash-verified

51
52// NewPageInfo creates a new PageInfo.
53func NewPageInfo(page, limit, offset int, sort []SortField) *PageInfo {
54 return &PageInfo{
55 Page: page,
56 Limit: limit,
57 Offset: offset,
58 Sort: sort,
59 }
60}
61
62// Start returns the start index based on page/limit or offset.
63func (p *PageInfo) Start() int {

Callers 2

Test_PageInfoSortByFunction · 0.85
NewFunction · 0.85

Calls

no outgoing calls

Tested by 1

Test_PageInfoSortByFunction · 0.68