unused

package
Version: v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:       "U1000",
	Doc:        "Unused code",
	Run:        run,
	Requires:   []*analysis.Analyzer{buildir.Analyzer, facts.Generated, facts.Directives},
	ResultType: reflect.TypeOf(Result{}),
}
View Source
var Debug io.Writer

Functions

This section is empty.

Types

type Result

type Result struct {
	Used   []types.Object
	Unused []types.Object
}

TODO(dh): should we return a map instead of two slices?

type SerializedObject

type SerializedObject struct {
	Name            string
	Position        token.Position
	DisplayPosition token.Position
	Kind            string
	InGenerated     bool
}

type SerializedResult

type SerializedResult struct {
	Used   []SerializedObject
	Unused []SerializedObject
}

func Serialize

func Serialize(pass *analysis.Pass, res Result, fset *token.FileSet) SerializedResult

Jump to

Keyboard shortcuts

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