responsewritercheck

package
v0.0.0-...-c98baff Latest Latest
Warning

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

Go to latest
Published: Mar 30, 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 VistorFunc

type VistorFunc 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 (VistorFunc) Visit

func (f VistorFunc) 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