Help us shape the future of Go! Take the 2026 Go Developer Survey

glob

package
v3.4.13 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 3

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

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

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