match

package
v1.0.44 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(rule *Rule, pkgPath string, isMainModule bool, funcDecl *info.DeclInfo) bool

func MatchRules

func MatchRules(rules []Rule, pkgPath string, isMainModule bool, funcDecl *info.DeclInfo) string

Types

type Pattern

type Pattern struct {
	// contains filtered or unexported fields
}

func CompilePattern

func CompilePattern(s string) *Pattern

func (*Pattern) Match

func (c *Pattern) Match(path string) bool

match exact

func (*Pattern) MatchPrefix

func (c *Pattern) MatchPrefix(path string) bool

type Patterns

type Patterns []*Pattern

func CompilePatterns

func CompilePatterns(patterns []string) Patterns

func (Patterns) MatchAny

func (c Patterns) MatchAny(path string) bool

func (Patterns) MatchAnyPrefix

func (c Patterns) MatchAnyPrefix(path string) bool

type Rule

type Rule struct {
	Any        bool    `json:"any"`
	Kind       *string `json:"kind"`
	Pkg        *string `json:"pkg"`
	Name       *string `json:"name"`
	Stdlib     *bool   `json:"stdlib"`
	MainModule *bool   `json:"main_module"`
	Generic    *bool   `json:"generic"`
	Exported   *bool   `json:"exported"`
	Action     string  `json:"action"` // include,exclude or empty
	// contains filtered or unexported fields
}

func (*Rule) Parse

func (c *Rule) Parse()

Jump to

Keyboard shortcuts

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