matcher

package
v0.0.0-...-5c775dd Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(m Matcher, p []byte) bool

Types

type Config

type Config struct {
	Pattern    string
	IgnoreCase bool
}

type GlobMatcher

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

func NewGlobMatcher

func NewGlobMatcher(cfg *Config) (*GlobMatcher, error)

func (*GlobMatcher) Match

func (m *GlobMatcher) Match(p []byte) bool

type Matcher

type Matcher interface {
	Match(p []byte) bool
}

type PrefixMatcher

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

func NewPrefixMatcher

func NewPrefixMatcher(cfg *Config) (*PrefixMatcher, error)

func (*PrefixMatcher) Match

func (m *PrefixMatcher) Match(p []byte) bool

Jump to

Keyboard shortcuts

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