exclude

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: ISC Imports: 7 Imported by: 7 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Pattern gitignore.Pattern
}

func MustParseRule

func MustParseRule(pattern string) *Rule

func ParseRule

func ParseRule(pattern string) (*Rule, error)

func (*Rule) Match

func (rule *Rule) Match(path []string, isDir bool) (bool, bool, error)

type RuleSet

type RuleSet struct {
	Rules []*Rule
}

func NewRuleSet

func NewRuleSet() *RuleSet

func (*RuleSet) AddRule

func (ruleset *RuleSet) AddRule(pattern string) error

func (*RuleSet) AddRules

func (ruleset *RuleSet) AddRules(iterator iter.Seq2[string, error]) error

func (*RuleSet) AddRulesFromArray

func (ruleset *RuleSet) AddRulesFromArray(lines []string) error

func (*RuleSet) AddRulesFromFile

func (ruleset *RuleSet) AddRulesFromFile(filename string) error

func (*RuleSet) AddRulesFromReader

func (ruleset *RuleSet) AddRulesFromReader(rd io.Reader) error

func (*RuleSet) IsExcluded

func (ruleset *RuleSet) IsExcluded(path string, isDir bool) bool

func (*RuleSet) Match

func (ruleset *RuleSet) Match(path string, isDir bool) (bool, *Rule, error)

Jump to

Keyboard shortcuts

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