analyzer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyzer

func NewAnalyzer() *analysis.Analyzer

NewAnalyzer creates a new analyzer that parses flags for runner config.

func NewAnalyzerWithConfig

func NewAnalyzerWithConfig(c Config) *analysis.Analyzer

NewAnalyzer creates a new analyzer that parses flags for runner config.

Types

type Aliases

type Aliases map[string]string

Aliases in a [packagePath] => expectedAlias style.

Example:

Aliases: map[string]string{
	"net/url": "defaultNetUrl"
}

func (*Aliases) Set

func (f *Aliases) Set(value string) error

func (*Aliases) String

func (f *Aliases) String() string

type Config

type Config struct {
	// Import aliases. See [Aliases] comment for examples.
	Aliases Aliases

	// If true, dot imports will not be reported as invalid.
	IgnoreDot bool

	// If true, underscore imports will not be reported as invalid.
	IgnoreUnderscore bool
}

Jump to

Keyboard shortcuts

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