unused

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckMode

type CheckMode int
const (
	CheckConstants CheckMode = 1 << iota
	CheckFields
	CheckFunctions
	CheckTypes
	CheckVariables

	CheckAll = CheckConstants | CheckFields | CheckFunctions | CheckTypes | CheckVariables
)

type Checker

type Checker struct {
	Mode               CheckMode
	WholeProgram       bool
	ConsiderReflection bool
	Debug              io.Writer
	// contains filtered or unexported fields
}

func NewChecker

func NewChecker(mode CheckMode) *Checker

func (*Checker) Check

func (c *Checker) Check(prog *lint.Program) []Unused

type Error

type Error struct {
	Errors map[string][]error
}

func (Error) Error

func (e Error) Error() string

type LintChecker

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

func NewLintChecker

func NewLintChecker(c *Checker) *LintChecker

func (*LintChecker) Checks

func (l *LintChecker) Checks() []lint.Check

func (*LintChecker) Init

func (l *LintChecker) Init(*lint.Program)

func (*LintChecker) Lint

func (l *LintChecker) Lint(j *lint.Job)

func (*LintChecker) Name

func (*LintChecker) Name() string

func (*LintChecker) Prefix

func (*LintChecker) Prefix() string

type Unused

type Unused struct {
	Obj      types.Object
	Position token.Position
}

Jump to

Keyboard shortcuts

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