httpnoctx

package
v0.79.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL