package unused
import "honnef.co/go/tools/unused"
Package unused contains code for finding unused code.
Index ¶
Variables ¶
var Analyzer = &lint.Analyzer{ Doc: &lint.Documentation{ Title: "Unused code", }, Analyzer: &analysis.Analyzer{ Name: "U1000", Doc: "Unused code", Run: run, Requires: []*analysis.Analyzer{buildir.Analyzer, generated.Analyzer, directives.Analyzer}, ResultType: reflect.TypeOf(Result{}), }, }
Types ¶
type Result ¶
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 ¶
Source Files ¶
edge.go edgekind_string.go implements.go unused.go
- Version
- v0.3.3
- Published
- Jul 29, 2022
- Platform
- darwin/amd64
- Imports
- 19 packages
- Last checked
- 5 minutes ago –
Tools for package owners.