Documentation ¶
Overview ¶
Package adapted contains functions adapted from Go's standard library.
Index ¶
- Variables
- func ActualBytes(s string) (string, error)
- func CanonicalString(s string) string
- func Glob(pattern string) (matches []string, err error)
- func LookPath(name, path string) (string, bool, error)
- func Match(pattern, name string) (matched bool, err error)
- func TempFifo(prefix string) (name string, err error)
Constants ¶
This section is empty.
Variables ¶
var ErrBadPattern = errors.New("syntax error in pattern")
ErrBadPattern indicates a pattern was malformed.
Functions ¶
func ActualBytes ¶
ActualBytes converts any escape-sequence in s to the bytes they represent and returns the resulting sequence of actual bytes.
func CanonicalString ¶
CanonicalString returns a string in oh's dollar single-quoted format.
func Glob ¶
Glob returns the names of all files matching pattern or nil if there is no matching file. The syntax of patterns is the same as in Match. The pattern may describe hierarchical names such as /usr/*/bin/ed (assuming the Separator is '/').
Glob ignores file system errors such as I/O errors reading directories. The only possible returned error is ErrBadPattern, when pattern is malformed.
func Match ¶
Match reports whether name matches the shell file name pattern. The pattern syntax is:
pattern: { term } term: '*' matches any sequence of non-Separator characters '?' matches any single non-Separator character '[' [ '^' ] { character-range } ']' character class (must be non-empty) c matches character c (c != '*', '?', '\\', '[') '\\' c matches character c character-range: 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.
Types ¶
This section is empty.