unused

package
v2.0.9+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: MIT, MIT Imports: 10 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(lprog *loader.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) Funcs

func (l *LintChecker) Funcs() map[string]lint.Func

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