hellokaton / gorm-paginator

gorm pagination extension
MIT License
154 stars 52 forks source link

Method Pagging undefined #10

Open ages96 opened 5 years ago

ages96 commented 5 years ago

Here is my code

import (
     "github.com/biezhi/gorm-paginator/pagination"
)

var orders []structs.Order
db = helpers.DB.Where("id > ?", 0)

pagination.Pagging(&pagination.Param{
    DB:      db,
    Page:    1,
    Limit:   10,
    OrderBy: []string{"id desc"},
}, &orders)

Exception undefined: pagination.Pagging

does anyone have to be initialized first ?

brutus-gr commented 5 years ago

Paging is just mispelled, try pagination.Paging

dyoshikawa commented 5 years ago

This readme has typo. I issued a pull request, but no response yet.