glob

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EXACT  = "exact"
	GLOB   = "glob"
	REGEXP = "regexp"
)

Variables

This section is empty.

Functions

func Match

func Match(pattern, text string, separators ...rune) bool

Match tries to match a text with a given glob pattern.

func MatchStringInList added in v2.5.0

func MatchStringInList(list []string, item string, patternMatch string) bool

MatchStringInList will return true if item is contained in list. patternMatch; can be set to exact, glob, regexp. If patternMatch; is set to exact, the item must be an exact match. If patternMatch; is set to glob, the item must match a glob pattern. If patternMatch; is set to regexp, the item must match a regular expression or glob.

func MatchWithError added in v2.13.1

func MatchWithError(pattern, text string, separators ...rune) (bool, error)

MatchWithError tries to match a text with a given glob pattern. returns error if the glob pattern fails to compile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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