importas

package module
v0.0.0-...-bbab12b Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

importas

test.....integrate samealias

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "importas",
	Doc:  "Enforces consistent import aliases",
	Run:  run,

	Flags: flags(config),

	Requires: []*analysis.Analyzer{inspect.Analyzer},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	RequiredAlias        map[string]string
	Rules                []*Rule
	DisallowUnaliased    bool
	DisallowExtraAliases bool
}

func (*Config) AliasFor

func (c *Config) AliasFor(path string) (string, bool)

func (*Config) CompileRegexp

func (c *Config) CompileRegexp() error

type Rule

type Rule struct {
	Alias  string
	Regexp *regexp.Regexp
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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