Documentation ¶
Overview ¶
Package expr defines the supported types of match expressions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache defines a memoized data structure that associates regular expression patterns with their compiled regexp.Regexp representations. It contains synchronization primitives for safely accessing elements concurrently from multiple goroutines.
From a (Expr).Match context, it enables reuse of regexp.Regexp objects across multiple calls without having to recompile the pattern string each time.
type ErrInvalidExpr ¶
type ErrInvalidExpr Expr
Error types specific to package expr that may be returned by one of its exported functions or methods. Use type assertion to determine the type of error and the interface func Error() for a descriptive error message.
func (ErrInvalidExpr) Error ¶
func (e ErrInvalidExpr) Error() string
Error returns a descriptive error string for the receiver ErrInvalidExpr e.
type Expr ¶
type Expr int
Expr enumerates all supported types of match expressions.
const ( Fixed Expr = iota // Match entire file names verbatim Glob // Match using standard Go path.Match semantics Regexp // Match using standard Go regexp.Regexp semantics )
Enumerated constants of type Expr.