Skip to content

Commit 9a42ce2

Browse files
committed
Fix omitempty
1 parent 7b8ca2a commit 9a42ce2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

zendesk/zendesk.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,47 +46,47 @@ type (
4646
// it is more performant on large datasets.
4747
OffsetPagination struct {
4848
// Page is the page number to request.
49-
Page int `url:"page",omitempty`
49+
Page int `url:"page,omitempty"`
5050

5151
// PerPage is the number of results desired on each page.
5252
// Most endpoints support up to 100 records per page.
53-
PerPage int `url:"per_page",omitempty`
53+
PerPage int `url:"per_page,omitempty"`
5454
}
5555

5656
// OffsetPaginationMeta contains next and previous page pointers.
5757
OffsetPaginationMeta struct {
5858
// NextPage is a link to the next page of results, nil if none left.
59-
NextPage string `json:"next_page",omitempty`
59+
NextPage string `json:"next_page,omitempty"`
6060

6161
// PreviousPage is a link to the previous page of results, nil if on first page.
62-
PreviousPage string `json:"previous_page",omitempty`
62+
PreviousPage string `json:"previous_page,omitempty"`
6363
}
6464

6565
// CursorPagination contains options for using cursor pagination.
6666
// Cursor pagination is preferred where possible.
6767
CursorPagination struct {
6868
// PageSize sets the number of results per page.
6969
// Most endpoints support up to 100 records per page.
70-
PageSize int `url:"page[size]",omitempty`
70+
PageSize int `url:"page[size],omitempty"`
7171

7272
// PageAfter provides the "next" cursor.
73-
PageAfter string `url:"page[after]",omitempty`
73+
PageAfter string `url:"page[after],omitempty"`
7474

7575
// PageBefore provides the "previous" cursor.
76-
PageBefore string `url:"page[before]",omitempty`
76+
PageBefore string `url:"page[before],omitempty"`
7777
}
7878

7979
// CursorPaginationMeta contains information concerning how to fetch
8080
// next and previous results, and if next results exist.
8181
CursorPaginationMeta struct {
8282
// HasMore is true if more results exist in the endpoint.
83-
HasMore bool `json:"has_more",omitempty`
83+
HasMore bool `json:"has_more,omitempty"`
8484

8585
// AfterCursor contains the cursor of the next result set.
86-
AfterCursor string `json:"after_cursor",omitempty`
86+
AfterCursor string `json:"after_cursor,omitempty"`
8787

8888
// BeforeCursor contains the cursor of the previous result set.
89-
BeforeCursor string `json:"before_cursor",omitempty`
89+
BeforeCursor string `json:"before_cursor,omitempty"`
9090
}
9191
)
9292

0 commit comments

Comments
 (0)