Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ANSI escape code cleaner ANSI_CLEANER = regexp.MustCompile(`(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]`) // ANSI non-color escape code cleaner, matches only control codes ANSI_CONTROL_CLEANER = regexp.MustCompile(`(\x9B|\x1B\[)[0-?]*[ -\/]*[@-ln-~]`) )
Functions ¶
func RemoveAllANSI ¶ added in v0.2.0
func RemoveControlANSI ¶ added in v0.2.0
Types ¶
type PathFilter ¶
type PathFilter struct {
// contains filtered or unexported fields
}
A filter that matches paths.
func NewPathFilterFromSlice ¶
func NewPathFilterFromSlice(slice []string, recursive bool) *PathFilter
func (*PathFilter) Match ¶
func (f *PathFilter) Match(item string) bool
func (*PathFilter) MatchAny ¶
func (f *PathFilter) MatchAny(items []string) bool
func (*PathFilter) SetStrict ¶
func (f *PathFilter) SetStrict()
Force the filter to match nothing if it is empty.
type StringFilter ¶
type StringFilter struct {
// contains filtered or unexported fields
}
A filter that matches strings.
func NewStringFilterFromSlice ¶
func NewStringFilterFromSlice(slice []string) *StringFilter
func (*StringFilter) Match ¶
func (f *StringFilter) Match(item string) bool
func (*StringFilter) MatchAny ¶
func (f *StringFilter) MatchAny(items []string) bool
func (*StringFilter) SetStrict ¶
func (f *StringFilter) SetStrict()
Force the filter to match nothing if it is empty.
Click to show internal directories.
Click to hide internal directories.