responsewritercheck

package
v1.4.8-rc2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package responsewritercheck checks that HTTP handlers do not pass the http.ResponseWriter to more than one function

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "responsewritercheck",
	Doc:  "reports instances where HTTP handlers pass the http.Responsewriter to more than one function",
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
		ctrlflow.Analyzer,
	},
}

Analyzer defines the responsewritercheck analysis tool, allowing it to be used with the analysis framework.

Functions

This section is empty.

Types

type VisitorFunc added in v1.4.7

type VisitorFunc func(n ast.Node) ast.Visitor

VisitorFunc is an adapter for the ast.Visitor interface. It allows passing in anonymous functions that adhere to the Visitor interface.

func (VisitorFunc) Visit added in v1.4.7

func (f VisitorFunc) Visit(n ast.Node) ast.Visitor

Visit implements ast.Visitor by calling f.

Jump to

Keyboard shortcuts

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