Skip to content
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

Adding ctx to public methods #15

Open
yurifedoseev opened this issue Feb 16, 2023 · 1 comment
Open

Adding ctx to public methods #15

yurifedoseev opened this issue Feb 16, 2023 · 1 comment

Comments

@yurifedoseev
Copy link

Hi @dukex, thanks for your work!
I'd like to add context.Context objects to public methods - to have a better control on requests and cancelling logic. Otherwise I have no control on cancelling hanged request from my application code.
Before creating a PR I want to discuss it here. I want to change existing public method. For example it will be. Track(ctx, distinctId, eventName string, e *Event). Even it's a breaking change it can be fixed via context.TODO() if user doesnt have any other ctx to use.
Also I can create another sets of methods like TrackCtx but it will make api and the code a little bit messy.

What do you think?

@yurifedoseev
Copy link
Author

Did a pr #16

@yurifedoseev yurifedoseev changed the title Adding ctx to public methoc Adding ctx to public methods Feb 17, 2023
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

No branches or pull requests

1 participant