Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: pass context.Context to HTTP requests#5289

Merged
caarlos0 merged 1 commit into
goreleaser:mainfrom
alexandear:refactor/pass-std-context
Nov 16, 2024
Merged

feat: pass context.Context to HTTP requests#5289
caarlos0 merged 1 commit into
goreleaser:mainfrom
alexandear:refactor/pass-std-context

Conversation

@alexandear
Copy link
Copy Markdown
Contributor

This PR adds using context.Context in HTTP requests. Changes are similar to #5232.

Additionally, it enables noctx to automatically detect missing context:

internal/pipe/webhook/webhook.go:85:29: should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
internal/pipe/linkedin/client.go:68:27: (*net/http.Client).Get must not be called (noctx)
internal/pipe/linkedin/client.go:101:27: (*net/http.Client).Get must not be called (noctx)
internal/pipe/linkedin/client.go:172:28: (*net/http.Client).Post must not be called (noctx)

@pull-request-size pull-request-size Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 15, 2024
@caarlos0 caarlos0 merged commit c65b225 into goreleaser:main Nov 16, 2024
@caarlos0
Copy link
Copy Markdown
Member

thanks!

@alexandear alexandear deleted the refactor/pass-std-context branch November 16, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants