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.
|
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 |
|
}
|
|
|