top
(README.md)
<pre>
martini-paginate
  pagination helper for martini

example:
  m := martini.Classic()
  m := Get("/test", Paginator, TestHandler)

  func TestHandler(paging *Paginate, r *http.Request, w http.ResponseWriter) (int, string) {
        return http.StatusOK, string("page: " + strconv.Itoa(paging.Page()) + ", per_page: " + strconv.Itoa(paging.Limit()) + ", skip: " + strconv.Itoa(paging.Skip()))
  }

  curl http://localhost:3000/test?page=1&per_page=40
</pre>

Imports 1 package(s) ΒΆ

  1. github.com/go-martini/martini