Versions in this module Expand all Collapse all v0 v0.4.0 Oct 8, 2026 Changes in this version + var ErrLoad = errors.New("deadcode: packages do not type-check") + var ErrNoMains = errors.New("deadcode: the patterns hold no main package or test to reach anything from") + var ErrNotFound = errors.New("deadcode: no function declaration at the recorded position") + var ErrProtected = errors.New("deadcode: the remover never edits its own package") + func Remove(functions []Function) (map[string][]byte, error) + type Function struct + Exported bool + InMain bool + InTest bool + Name string + Package string + Position token.Position + Satisfies bool + func Find(dir string, patterns ...string) ([]Function, error) + func Fix(dir string, patterns ...string) ([]Function, error) + func (function Function) Protected() bool + func (function Function) Removable() bool + func (function Function) String() string