-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[R4R]add query option to getTokens api, resolve issue #57 #58
Conversation
} | ||
|
||
func (param *OrdersQuery) Check() error { | ||
if param.Limit != nil && *param.Limit <= 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we check offset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, added.
// OrdersQuery definition | ||
type OrdersQuery struct { | ||
Offset *uint32 `json:"offset,omitempty,string"` //Option | ||
Limit *uint32 `json:"limit,omitempty,string"` //Option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use pointer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field is optional, use can not assign them so that will use default by backend service.
If not use pointer, will always send a query parameter to backend service
No description provided.