Documentation ¶
Overview ¶
Package ignore defines the implementation of file ignoring patterns that will be used during bundle. It defines an interface FileIgnorer, that should be implemented by all functions that intend to provide file ignore logic. Currently it has two implementations of FileIgnorer:
- a default ignorer that checks a file or directory for ignorability for all common patterns such as .git, node_modules, vendor etc.,
- a docker ignorer checks a file or directory for ignorability based on the patterns defined in .dockerignore file
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileIgnorer ¶
type FileIgnorer interface { // CanIgnore checks file has to be ignored or not, returns true if it needs to be ignored CanIgnore(path string, fi os.FileInfo) (Ignorable, error) }
FileIgnorer helps identifying if a BundleFile needs to be ignored
func NewOrDefault ¶
func NewOrDefault(dir string) (FileIgnorer, error)
NewOrDefault builds and returns the new or default FileIgnorer interface In all file not found cases the this wil return the default ignorer
Click to show internal directories.
Click to hide internal directories.