Fix setDefaults (#508)
close one issue of #507 Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/508 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
4fac753f78
commit
120aa6234e
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ func (o ListOptions) getURLQuery() url.Values {
|
|||
return query
|
||||
}
|
||||
|
||||
func (o ListOptions) setDefaults() {
|
||||
// setDefaults set default pagination options if none or wrong are set
|
||||
func (o *ListOptions) setDefaults() {
|
||||
if o.Page < 1 {
|
||||
o.Page = 1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue