pattern

package
v0.0.0-...-202a999 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GlobPrefix represents the glob pattern prefix.
	GlobPrefix = "glob:"

	// RegexpPrefix represents the regexp pattern prefix.
	RegexpPrefix = "regexp:"
)

Variables

This section is empty.

Functions

func Match

func Match(pattern, value string) (bool, error)

Match returns true if the value matches the pattern, or an error if pattern compilation fails. If the pattern is prefixed with "glob:" the value will be evaluated using shell-style globbing, if it prefixed with "regexp:" it will be evaluated using regular expression matching.

Types

This section is empty.

Jump to

Keyboard shortcuts

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