envsubst: gomodules.xyz/envsubst/path Index | Files

package path

import "gomodules.xyz/envsubst/path"


Package Files



var ErrBadPattern = errors.New("syntax error in pattern")

ErrBadPattern indicates a globbing pattern was malformed.

func Match Uses

func Match(pattern, name string) (matched bool, err error)

Match reports whether name matches the shell file name pattern. The pattern syntax is:

	{ term }
	'*'         matches any sequence of non-/ characters
	'?'         matches any single non-/ character
	'[' [ '^' ] { character-range } ']'
	            character class (must be non-empty)
	c           matches character c (c != '*', '?', '\\', '[')
	'\\' c      matches character c

	c           matches character c (c != '\\', '-', ']')
	'\\' c      matches character c
	lo '-' hi   matches character c for lo <= c <= hi

Match requires pattern to match all of name, not just a substring. The only possible returned error is ErrBadPattern, when pattern is malformed.

Package path imports 2 packages (graph) and is imported by 1 packages. Updated 2019-04-12. Refresh now. Tools for package owners. This is a quick bug-fix fork (has fewer than three commits, and only during the week it was created).