nogofunc

package
v0.0.0-...-c7609e9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "nogofunc",
	Doc:              "gathers a list of function signatures whose invocations may pass a pointer to a function that starts a goroutine",
	Run:              run,
	RunDespiteErrors: true,
	Requires:         []*analysis.Analyzer{inspect.Analyzer, packid.Analyzer, callgraph.Analyzer},
	ResultType:       reflect.TypeOf((*Result)(nil)),
}

Analyzer provides a set of function signatures whose invocations start a goroutine. False-positives should be expected, as no type-checking information is used during the analysis, which relies only on approximate knowledge of the call-graph.

Functions

This section is empty.

Types

type Result

type Result struct {
	// AsyncSignatures is a set of signatures from which a goroutine can be reached in the callgraph
	// via functions that accept pointer arguments.
	AsyncSignatures map[callgraph.Signature]struct{}
	// ContainsGoStmt is a set of signatures whose declarations contain a go statement.
	ContainsGoStmt map[callgraph.Signature]struct{}
}

Result is the result of the nogofunc analyzer.

Jump to

Keyboard shortcuts

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