gotools/go/analysis/passes/httpmux/httpmux.go

const Doc

var Analyzer

var inTest

func run(pass *analysis.Pass) (any, error) {}

// isServeMuxRegisterCall reports whether call is a static call to one of:
// - net/http.Handle
// - net/http.HandleFunc
// - net/http.ServeMux.Handle
// - net/http.ServeMux.HandleFunc
// TODO(jba): consider expanding this to accommodate wrappers around these functions.
func isServeMuxRegisterCall(pass *analysis.Pass, call *ast.CallExpr) bool {}

// isMethodNamed reports when a function f is a method,
// in a package with the path pkgPath and the name of f is in names.
func isMethodNamed(f *types.Func, pkgPath string, names ...string) bool {}

// stringConstantExpr returns expression's string constant value.
//
// ("", false) is returned if expression isn't a string
// constant.
func stringConstantExpr(pass *analysis.Pass, expr ast.Expr) (string, bool) {}

var wildcardRegexp

// likelyEnhancedPattern reports whether the ServeMux pattern pat probably
// contains either an HTTP method name or a wildcard, extensions added in Go 1.22.
func likelyEnhancedPattern(pat string) bool {}

func goVersionAfter121(goVersion string) bool {}

func goVersion(pkg *types.Package) string {}

var tagRegexp

// Copied from pkgsite/internal/stdlib.VersionForTag.
func versionFromGoVersion(goVersion string) string {}