https://github.com/acoshift/paginate
Pagination Logic for your template in Go
https://github.com/acoshift/paginate
Last synced: 11 months ago
JSON representation
Pagination Logic for your template in Go
- Host: GitHub
- URL: https://github.com/acoshift/paginate
- Owner: acoshift
- License: mit
- Created: 2018-02-14T14:45:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-27T04:48:24.000Z (almost 7 years ago)
- Last Synced: 2024-06-21T06:39:20.189Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 114 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# paginate
[](https://travis-ci.org/acoshift/paginate)
[](https://coveralls.io/github/acoshift/paginate?branch=master)
[](https://goreportcard.com/report/github.com/acoshift/paginate)
[](https://godoc.org/github.com/acoshift/paginate)
Pagination Logic for your template
## Example
```html
{{define "pagination"}}
First
Prev
{{range .Pages 2 2}}
{{if eq . 0}}
...
{{else if eq $.Page .}}
{{.}}
{{else}}
{{.}}
{{end}}
{{end}}
Next
Last
{{end}}
```
