Skip to content

Commit 687af8f

Browse files
committed
feat(pagination): add json tag to Request
1 parent 88d0cf1 commit 687af8f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pagination/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## To be released
44

5+
* feat(pagination): add `json` tag to `Request`
6+
57
## v1.1.2
68

79
* feat(pagination): add `log` tag to `Request` and `Meta`

pagination/request.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package pagination
33
const defaultPerPage = 20
44

55
type Request struct {
6-
Page int `log:"page"` // page requested (default 1)
7-
PerPage int `log:"per_page"` // Number of items per page
6+
Page int `json:"page" log:"page"` // page requested (default 1)
7+
PerPage int `json:"per_page" log:"per_page"` // Number of items per page
88
}
99

1010
func NewRequest(page, perPage int) Request {

0 commit comments

Comments
 (0)