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

Method PreviousPageURLWithKeys

middleware/paginate/page_info.go:97–102  ·  view source on GitHub ↗

PreviousPageURLWithKeys returns the URL for the previous page using custom query keys. Returns empty string if on page 1.

(baseURL, pageKey, limitKey string)

Source from the content-addressed store, hash-verified

95// PreviousPageURLWithKeys returns the URL for the previous page using custom query keys.
96// Returns empty string if on page 1.
97func (p *PageInfo) PreviousPageURLWithKeys(baseURL, pageKey, limitKey string) string {
98 if p.Page > 1 {
99 return buildPaginationURL(baseURL, pageKey, utils.FormatInt(int64(p.Page-1)), limitKey, utils.FormatInt(int64(p.Limit)))
100 }
101 return ""
102}
103
104// PreviousPageURL returns the URL for the previous page.
105// Returns empty string if on page 1.

Callers 2

PreviousPageURLMethod · 0.95

Calls 1

buildPaginationURLFunction · 0.85

Tested by 1