Documentation
¶
Index ¶
- func FormatTime(t time.Time) string
- func MatchPattern(ctx context.Context, content string, patterns []string, opts ...MatchOption) bool
- func MatchPatternScanner(ctx context.Context, scanner *bufio.Scanner, patterns []string, ...) bool
- func ParseTime(val string) (time.Time, error)
- func TruncString(val string, max int) string
- type KeyValue
- type MatchOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchPattern ¶
MatchPattern matches content against patterns using either literal or regex matching. For files or large content, use MatchPatternScanner instead.
func MatchPatternScanner ¶
func TruncString ¶
TruncString TurnString returns truncated string.
Types ¶
type KeyValue ¶
type KeyValue string
func NewKeyValue ¶
func (KeyValue) MarshalJSON ¶
func (*KeyValue) UnmarshalJSON ¶
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.