You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
134 B
Go
11 lines
134 B
Go
2 years ago
|
package page
|
||
|
|
||
|
func GetOffset(page uint64, pageSize uint64) int {
|
||
|
if page <= 0 {
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
return int((page - 1) * pageSize)
|
||
|
}
|
||
|
|