glob

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Patterns

type Patterns []string

Patterns can glob-match files or directories.

func New

func New(patterns ...string) (Patterns, error)

New returns a new glob pattern. It returns an error if any of the patterns is invalid.

func (Patterns) Match

func (p Patterns) Match(path string, isDir bool) bool

Match a path to the defined patterns. If it is a file a full match is required. If it is a directory, only matching a prefix of any of the patterns is required.

Jump to

Keyboard shortcuts

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