Skip to content

Conversation

@MaestroJurko
Copy link

No description provided.

Copy link
Owner

@draganm draganm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add validation for sort query, allow only asc and desc.

var errTimeout = errors.New("timeout")

func (c *Client) PollForEvents(ctx context.Context, lastID string, limit int, evts any) ([]string, error) {
func (c *Client) PollForEvents(ctx context.Context, lastID string, limit int, sort string, evts any) ([]string, error) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think the interface is not really clear. How about adding either a type Order with two const values, or passing a boolean ascending. Sting allows for way too many 'wrong' values to be passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants