chore: fix typo
This commit is contained in:
@ -5,11 +5,16 @@ type PageReq struct {
|
||||
PageSize int `json:"page_size" form:"page_size"`
|
||||
}
|
||||
|
||||
const MaxUint = ^uint(0)
|
||||
const MinUint = 0
|
||||
const MaxInt = int(MaxUint >> 1)
|
||||
const MinInt = -MaxInt - 1
|
||||
|
||||
func (p *PageReq) Validate() {
|
||||
if p.PageIndex < 1 {
|
||||
p.PageIndex = 1
|
||||
}
|
||||
if p.PageSize < 1 {
|
||||
p.PageSize = 50
|
||||
p.PageSize = MaxInt
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user