Documentation
¶
Overview ¶
Package httpnoctx implements a Go analysis linter that flags HTTP calls that do not accept a context.Context: (*http.Client).Get, .Head, .Post, .PostForm and the package-level http.Get/Head/Post/PostForm shortcuts. The fix is to build the request with http.NewRequestWithContext and call client.Do so that cancellation and deadline are propagated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "httpnoctx", Doc: "reports http.Client and package-level HTTP calls that do not accept a context.Context; use http.NewRequestWithContext + client.Do instead", URL: "https://github.com/github/gh-aw/tree/main/pkg/linters/httpnoctx", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer is the http-no-ctx analysis pass.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.