regexp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package regexp provides an implementation to match strings against a set of regexp string filters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegexpFilterSet

func NewRegexpFilterSet(filters []string, opts ...Option) (filterset.FilterSet, error)

NewRegexpFilterSet constructs a FilterSet of re2 regex strings. If any of the given filters fail to compile into re2, an error is returned.

Types

type Option

type Option func(*regexpFilterSet)

Option is the type for regexp filtering options that can be passed to NewRegexpFilterSet.

func WithCache

func WithCache(maxNumEntries int) Option

WithCache enables an LRU cache that stores the previous results of calls to Matches. The cache's max number of entries is set to maxNumEntries. Passing a value of 0 results in an unlimited cache size.

Jump to

Keyboard shortcuts

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