deadcode

package
v0.0.0-...-d24fe34 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: BSD-3-Clause Imports: 9 Imported by: 14

README

deadcode

deadcode is a very simple utility which detects unused declarations in a Go package.

Usage

deadcode [-test] [packages]

    -test     Include test files
    packages  A list of packages using the same conventions as the go tool

Limitations

  • Self-referential unused code is not currently reported
  • A single package can be tested at a time
  • Unused methods are not reported

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func (*Context) Load

func (ctx *Context) Load(args ...string)

func (*Context) Process

func (ctx *Context) Process() []types.Object

type Issue

type Issue struct {
	Pos             token.Position
	UnusedIdentName string
}

func Run

func Run(program *loader.Program) ([]Issue, error)

Jump to

Keyboard shortcuts

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