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

Add WithContext to google.ListerOption #776

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

micnncim
Copy link
Contributor

@micnncim micnncim commented Sep 27, 2020

Added WithContext function, which implements google.ListerOption. This enables us to pass context.Context so that we could cancel sending HTTP requests. This PR won't change the default behavior since (*http.Client).Get wraps http.NewRequest and (*http.Client).Do and http.NewRequest wraps http.NewRequestWithContext with context.Background.

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2020

Codecov Report

Merging #776 into master will decrease coverage by 0.08%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #776      +/-   ##
==========================================
- Coverage   75.99%   75.91%   -0.09%     
==========================================
  Files         102      102              
  Lines        4132     4139       +7     
==========================================
+ Hits         3140     3142       +2     
- Misses        542      546       +4     
- Partials      450      451       +1     
Impacted Files Coverage Δ
pkg/v1/google/options.go 70.58% <0.00%> (-15.13%) ⬇️
pkg/v1/google/list.go 62.06% <60.00%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f2724c...8af297f. Read the comment docs.

Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Sorry for the delay, I've been away on vacation.

@jonjohnsonjr jonjohnsonjr merged commit 5e45177 into google:master Oct 6, 2020
@micnncim micnncim deleted the support-context-google-list branch October 15, 2020 03:16
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.

None yet

3 participants