exclude

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: ISC Imports: 7 Imported by: 1

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