paganation

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPage = 1
	DefaultSize = 20
	MaxSize     = 1000
)

Functions

func GetStartPage

func GetStartPage(page, size, total int) int

GetStartPage 获取起始查询位置

func NewCommonPagination

func NewCommonPagination(listLen, pageNo, pageSize, total uint32) *pagination

NewCommonPagination 新增通用分布结构体

func VerifyPage added in v1.0.3

func VerifyPage(page, size int) (rtPage int, rtSize int)

VerifyPage 校验分页参数

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL