-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Introduce Context #287
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
base: main
Are you sure you want to change the base?
Conversation
I'm concerned about the duplication in SendRequest/SendRequestWithContext - it might be better to have SendRequest just call SendRequestWithContext with a context.Background(), and then that way you only have one version of the code. |
} | ||
|
||
func GetNext(baseUrl string, response interface{}, getNextPage func(nextPageUri string) (interface{}, error)) (interface{}, error) { | ||
func GetNextWithContext(ctx context.Context, baseUrl string, response interface{}, getNextPage func(ctx context.Context, nextPageUri string) (interface{}, error)) (interface{}, error) { |
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.
I think we need to add this as a second method, similar to the SendRequestWithContext, otherwise we're going to break everyone's clients.
Hi there, I was really excited to see progress being made on adding Context support to twilio-go, but it looks like this pull request has lost momentum. Is the Twilio team still pursuing this? Do y'all have an ETA? If it's not on the short-term roadmap, would you be open to reviewing a new PR? I think I mostly understand how twilio-go and twilio-oai-generator rely on each other. Thanks so much, Matt Light |
Hi @lightster, |
Fixes
Introduce Context
Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.