glob

package
v3.75.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithExcludeGlobs

func WithExcludeGlobs(excludes ...string) globFilterOpt

WithExcludeGlobs adds exclude globs to the filter.

func WithIncludeGlobs

func WithIncludeGlobs(includes ...string) globFilterOpt

WithIncludeGlobs adds include globs to the filter.

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter is a generic filter for excluding and including globs (limited regular expressions). Exclusion takes precedence if both include and exclude lists are provided.

func NewGlobFilter

func NewGlobFilter(opts ...globFilterOpt) (*Filter, error)

NewGlobFilter creates a new Filter with the provided options.

func (*Filter) ShouldInclude

func (f *Filter) ShouldInclude(object string) bool

ShouldInclude returns whether the object is in the include list or not in the exclude list (exclude taking precedence).

Jump to

Keyboard shortcuts

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