Skip to content

Conversation

manisha1997
Copy link
Contributor

Fixes

Introduce Context

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@manisha1997 manisha1997 linked an issue May 19, 2025 that may be closed by this pull request
@kevinburkesegment
Copy link
Contributor

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) {
Copy link
Contributor

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.

@lightster
Copy link

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

@manisha1997
Copy link
Contributor Author

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,
We did start working on this, but we currently do not have this on priority.
We are opening to review PR.

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.

Please reintroduce context.Context
3 participants