matcher

package
v0.0.0-...-84b758b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package matcher implements a file-based regexp matcher. A list of regular expressions are loaded from a file, one per line, and then strings can be checked whether they match any of the regular expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher []*regexp.Regexp

func New

func New(filterfile string) (Matcher, error)

New returns an object that can be used to match against regular expressions in the given filterfile.

func (*Matcher) Matches

func (m *Matcher) Matches(needle string) bool

Matches returns true if any regular expression in the matcher matches the needle string.

Jump to

Keyboard shortcuts

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