mirror of
https://github.com/labring/sealos.git
synced 2026-09-21 05:44:43 +08:00
* chore: unify the start index to page * feat: async clean log * feat: to limit offset utils
14 lines
227 B
Go
14 lines
227 B
Go
package controller
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func parsePageParams(c *gin.Context) (page, perPage int) {
|
|
page, _ = strconv.Atoi(c.Query("p"))
|
|
perPage, _ = strconv.Atoi(c.Query("per_page"))
|
|
return
|
|
}
|