You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
221 B
21 lines
221 B
2 years ago
|
package util
|
||
|
|
||
|
const (
|
||
|
defaultLimit = 50
|
||
|
)
|
||
|
|
||
|
func GetPage(offset, limit *int32) (o, l int) {
|
||
|
|
||
|
if offset == nil {
|
||
|
o = 0
|
||
|
} else {
|
||
|
o = int(*offset)
|
||
|
}
|
||
|
if limit == nil {
|
||
|
l = 0
|
||
|
} else {
|
||
|
l = int(*limit)
|
||
|
}
|
||
|
return
|
||
|
}
|