internal

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const HelmIgnore = ".helmignore"

HelmIgnore default name of an ignorefile.

Variables

This section is empty.

Functions

func IsSymlink(fi os.FileInfo) bool

IsSymlink is used to determine if the fileinfo is a symbolic link.

func Walk

func Walk(root string, walkFn filepath.WalkFunc) error

Walk walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root. All errors that arise visiting files and directories are filtered by walkFn. The files are walked in lexical order, which makes the output deterministic but means that for very large directories Walk can be inefficient. Walk follows symbolic links.

Types

type Rules

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

Rules is a collection of path matching rules.

Parse() and ParseFile() will construct and populate new Rules. Empty() will create an immutable empty ruleset.

func Empty

func Empty() *Rules

Empty builds an empty ruleset.

func Parse

func Parse(file io.Reader) (*Rules, error)

Parse parses a rules file

func ParseFile

func ParseFile(file string) (*Rules, error)

ParseFile parses a helmignore file and returns the *Rules.

func (*Rules) AddDefaults

func (r *Rules) AddDefaults()

AddDefaults adds default ignore patterns.

Ignore all dotfiles in "templates/"

func (*Rules) Ignore

func (r *Rules) Ignore(path string, fi os.FileInfo) bool

Ignore evaluates the file at the given path, and returns true if it should be ignored.

Ignore evaluates path against the rules in order. Evaluation stops when a match is found. Matching a negative rule will stop evaluation.

Jump to

Keyboard shortcuts

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