Documentation
¶
Index ¶
- Constants
- func GetBaseFrom(dir gp.GardenPath) int
- type Ignore
- type RuleTree
- func (t *RuleTree) Append(dir gp.GardenPath, rules *Rules)
- func (t RuleTree) IsIgnored(path gp.GardenPath) bool
- func (t RuleTree) IsIgnoredWithBase(base int, path gp.GardenPath) bool
- func (t RuleTree) IsIgnoredWithBaseDir(baseDir gp.GardenPath, path gp.GardenPath) bool
- func (t *RuleTree) SetBase(base int)
- func (t *RuleTree) SetBaseFromDir(dir gp.GardenPath)
- type Rules
Constants ¶
View Source
const ExampleBase = `#.dotatoignore
**/*dotato*
**/README.md
`
View Source
const ExampleGroup = `#.dotatoignore
*
!.bashrc
# !my-dir
# !.my-file
`
Variables ¶
This section is empty.
Functions ¶
func GetBaseFrom ¶
func GetBaseFrom(dir gp.GardenPath) int
Types ¶
type Ignore ¶
type Ignore struct {
// contains filtered or unexported fields
}
Ignore wraps RuleTree and implements file read.
func NewWithFS ¶
func NewWithFS(fs billy.Filesystem, base gp.GardenPath, ignoreFileName string) *Ignore
func (Ignore) IsIgnoredWithBaseDir ¶
func (i Ignore) IsIgnoredWithBaseDir(baseDir gp.GardenPath, path gp.GardenPath) bool
type RuleTree ¶
type RuleTree struct {
// contains filtered or unexported fields
}
func (*RuleTree) Append ¶
func (t *RuleTree) Append(dir gp.GardenPath, rules *Rules)
Add rules to the tree at the given dir.
This function overwrites the existing rules.
If dir is nil, it will do nothing.
func (RuleTree) IsIgnoredWithBase ¶
func (t RuleTree) IsIgnoredWithBase(base int, path gp.GardenPath) bool
func (RuleTree) IsIgnoredWithBaseDir ¶
func (t RuleTree) IsIgnoredWithBaseDir(baseDir gp.GardenPath, path gp.GardenPath) bool
Use base from the given dir.
func (*RuleTree) SetBaseFromDir ¶
func (t *RuleTree) SetBaseFromDir(dir gp.GardenPath)
Click to show internal directories.
Click to hide internal directories.