specificity

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: BSD-3-Clause Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MisMatchClass    = 0
	DefaultClass     = 10
	StandardClass    = 20
	MatchClass       = 30
	NameClass        = 40
	LocalModuleClass = 50
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default struct{}

func (Default) Equal

func (d Default) Equal(to MatchSpecificity) bool

func (Default) IsMoreSpecific

func (d Default) IsMoreSpecific(than MatchSpecificity) bool

func (Default) String

func (d Default) String() string

type LocalModule added in v0.13.0

type LocalModule struct{}

func (LocalModule) Equal added in v0.13.0

func (m LocalModule) Equal(to MatchSpecificity) bool

func (LocalModule) IsMoreSpecific added in v0.13.0

func (m LocalModule) IsMoreSpecific(than MatchSpecificity) bool

type Match

type Match struct {
	Length int
}

func (Match) Equal

func (m Match) Equal(to MatchSpecificity) bool

func (Match) IsMoreSpecific

func (m Match) IsMoreSpecific(than MatchSpecificity) bool

func (Match) String

func (m Match) String() string

type MatchSpecificity

type MatchSpecificity interface {
	IsMoreSpecific(than MatchSpecificity) bool
	Equal(to MatchSpecificity) bool
	// contains filtered or unexported methods
}

MatchSpecificity is used to determine which section matches an import best

type MisMatch

type MisMatch struct{}

func (MisMatch) Equal

func (m MisMatch) Equal(to MatchSpecificity) bool

func (MisMatch) IsMoreSpecific

func (m MisMatch) IsMoreSpecific(than MatchSpecificity) bool

func (MisMatch) String

func (m MisMatch) String() string

type NameMatch added in v0.4.4

type NameMatch struct{}

func (NameMatch) Equal added in v0.4.4

func (n NameMatch) Equal(to MatchSpecificity) bool

func (NameMatch) IsMoreSpecific added in v0.4.4

func (n NameMatch) IsMoreSpecific(than MatchSpecificity) bool

func (NameMatch) String added in v0.4.4

func (n NameMatch) String() string

type StandardMatch

type StandardMatch struct{}

func (StandardMatch) Equal

func (s StandardMatch) Equal(to MatchSpecificity) bool

func (StandardMatch) IsMoreSpecific

func (s StandardMatch) IsMoreSpecific(than MatchSpecificity) bool

func (StandardMatch) String

func (s StandardMatch) String() string

Jump to

Keyboard shortcuts

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