package lint
import "honnef.co/go/tools/analysis/lint"
Package lint provides abstractions on top of go/analysis.
Index ¶
- func ExhaustiveTypeSwitch(v interface{})
- func InitializeAnalyzers(docs map[string]*Documentation, analyzers map[string]*analysis.Analyzer) map[string]*analysis.Analyzer
- type Directive
- type Documentation
- type VersionFlag
Functions ¶
func ExhaustiveTypeSwitch ¶
func ExhaustiveTypeSwitch(v interface{})
ExhaustiveTypeSwitch panics when called. It can be used to ensure that type switches are exhaustive.
func InitializeAnalyzers ¶
func InitializeAnalyzers(docs map[string]*Documentation, analyzers map[string]*analysis.Analyzer) map[string]*analysis.Analyzer
Types ¶
type Directive ¶
A directive is a comment of the form '//lint:<command> [arguments...]'. It represents instructions to the static analysis tool.
func ParseDirectives ¶
type Documentation ¶
type Documentation struct { Title string Text string Since string NonDefault bool Options []string }
func (*Documentation) String ¶
func (doc *Documentation) String() string
type VersionFlag ¶
type VersionFlag int
func (*VersionFlag) Get ¶
func (v *VersionFlag) Get() interface{}
func (*VersionFlag) Set ¶
func (v *VersionFlag) Set(s string) error
func (*VersionFlag) String ¶
func (v *VersionFlag) String() string
Source Files ¶
lint.go
- Version
- v0.1.2
- Published
- Feb 19, 2021
- Platform
- windows/amd64
- Imports
- 9 packages
- Last checked
- 7 minutes ago –
Tools for package owners.