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.
|
package types
|
|
|
|
// Page 頁數
|
|
type Page struct {
|
|
Current, Size int
|
|
}
|
|
|
|
// Take 取得數量
|
|
func (p Page) Take() int {
|
|
return p.Size
|
|
}
|
|
|
|
// Skip 忽略數量
|
|
func (p Page) Skip() int {
|
|
return (p.Current - 1) * p.Size
|
|
}
|