middleware

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ms []Middleware, as []*analysis.Analyzer) []*analysis.Analyzer

Apply the provided middleware(s) to the run function of each provided Analyzer.

Types

type Middleware

type Middleware func(RunFn) RunFn

Middleware modifies the behavior of a run function.

type RunFn

type RunFn = func(*analysis.Pass) (interface{}, error)

RunFn is a short-hand type alias for the (*Analyzer).Run function.

func ExcludeGeneratedFiles

func ExcludeGeneratedFiles(run RunFn) RunFn

ExcludeTestBinaries modifies an analyzer to completely skip generated test binary packages.

Generated test binary packages have a `.test`-suffix.

func ExcludeTestBinaries

func ExcludeTestBinaries(run RunFn) RunFn

ExcludeTestBinaries modifies an analyzer to completely skip generated test binary packages.

Generated test binary packages have a `.test`-suffix.

Jump to

Keyboard shortcuts

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