patternutil

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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