Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchPattern ¶
func MatchPattern(content string, patterns []string, opts ...MatchOption) bool
MatchPattern matches content against patterns using either literal or regex matching. For files or large content, use MatchPatternScanner instead.
func MatchPatternScanner ¶
func MatchPatternScanner(scanner *bufio.Scanner, patterns []string, opts ...MatchOption) bool
Types ¶
type MatchOption ¶
type MatchOption func(*matchOptions)
MatchOption represents an option for pattern matching
func WithExactMatch ¶
func WithExactMatch() MatchOption
WithExactMatch configures the matcher to use exact string matching for literal patterns
Click to show internal directories.
Click to hide internal directories.