func (pg *Pager) PrevURL() string {
	if pg.Prev > 0 {
		return fmt.Sprintf(pg.layout, pg.Prev)
	}
	return ""
}
PrevURL returns prev url
package helper
import "fmt"
type (
	PagerCursor struct {
		all   int
		size  int
		pages int
	}
	Pager struct {
		Begin   int
		End     int
		Prev    int
		Next    int
		Current int
		Pages   int
		All     int
		layout string
	}
	PagerItem struct {
		Page int
		Link string
	}
)
func NewPagerCursor(size, all int) *PagerCursor {
	pc := &PagerCursor{
		all:  all,
		size: size,
	}
	if all%size == 0 {
		pc.pages = all / size
	} else {
		pc.pages = all/size + 1
	}
	return pc
}
func (pg *PagerCursor) Page(i int) *Pager {
	if i < 1 {
		return nil
	}
	begin := (i - 1) * pg.size
	if begin > pg.all {
		return nil  
	}
	pager := &Pager{
		Begin:   begin,
		Prev:    i - 1,
		Next:    i + 1,
		Current: i,
		Pages:   pg.pages,
		All:     pg.all,
	}
	end := begin + pg.size
	if end >= pg.all {
		end = pg.all
		pager.Next = 0  
	}
	pager.End = end
	return pager
}
func (pg *Pager) SetLayout(layout string) {
	pg.layout = layout
}