package ignorefile
import "github.com/moby/patternmatcher/ignorefile"
Index ¶
Functions ¶
func ReadAll ¶
ReadAll reads an ignore file from a reader and returns the list of file patterns to ignore, applying the following rules:
- An UTF8 BOM header (if present) is stripped.
- Lines starting with "#" are considered comments and are skipped.
For remaining lines:
- Leading and trailing whitespace is removed from each ignore pattern.
- It uses filepath.Clean to get the shortest/cleanest path for ignore patterns.
- Leading forward-slashes ("/") are removed from ignore patterns, so "/some/path" and "some/path" are considered equivalent.
Source Files ¶
- Version
- v0.6.0 (latest)
- Published
- Aug 22, 2023
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 1 month ago –
Tools for package owners.