Documentation ¶
Overview ¶
Package matcher define common resource matcher
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filepath ¶
Filepath returns filepath based filepath matcher
// 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
Types ¶
type Basic ¶
type Basic struct { Prefix string Suffix string Filter string Directory *bool // contains filtered or unexported fields }
Basic represents prefix, suffix or regexp matcher
type Ignore ¶
type Ignore struct {
Rules []string
}
Ignore matcher represents matcher that matches file that are not in the ignore rules. The syntax of ignore borrows heavily from that of .gitignore; see https://git-scm.com/docs/gitignore or man gitignore for a full reference.
Each line is one of the following:
pattern: a pattern specifies file names to ignore (or explicitly include) in the upload. If multiple patterns match the file name, the last matching pattern takes precedence. comment: comments begin with # and are ignored (see "ADVANCED TOPICS" for an exception). If you want to include a # at the beginning of a pattern, you must escape it: \#. blank line: A blank line is ignored and useful for readability.
type Modification ¶
type Modification struct { After *time.Time Before *time.Time // contains filtered or unexported fields }
Modification represents modification matcher
func NewModification ¶
func NewModification(before, after *time.Time, matchers ...option.Matcher) *Modification
NewModification creates a modification time matcher