package xpage func GetPageOffset(page int32, size int32) int { if page < 1 { page = 1 } return int((page - 1) * size) }