Documentation
¶
Index ¶
- func EvalSymlinksCached(ctx context.Context, path string) (string, error)
- func Excluded(filePath string, ignorePaths, onlyPaths []string) bool
- func ExcludedAny(paths []string, ignored, inScope func(string) bool, restricted bool) bool
- func MatchesPath(pattern, filePath string) bool
- func PathEscapesDir(rel string) bool
- func WithResolvedPathCache(ctx context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalSymlinksCached ¶ added in v1.15.0
func Excluded ¶ added in v1.7.0
Excluded reports whether filePath should be dropped given ignore-paths and only-paths lists. A file is excluded if it matches any ignorePaths pattern; otherwise, when onlyPaths is non-empty, it is excluded unless it matches one of them. Patterns use MatchesPath semantics.
func ExcludedAny ¶ added in v1.20.0
ExcludedAny reports whether ignore-paths or only-paths leave out a file known by several paths, such as a file inside a chart archive and the declaration it is reported at: a path matched by an ignore drops the file, and when restricted, a path in scope keeps it. ignored and inScope decide one path.
func MatchesPath ¶
MatchesPath reports whether filePath is covered by pattern. pattern may be a literal path, a directory prefix, a single-star glob (*, ?, [...]), or a double-star glob (**) where ** matches zero or more path segments. Both arguments are normalized to forward slashes for OS-independent behavior, and cleaned, so "./app" and "app/" name the same directory as "app".
func PathEscapesDir ¶ added in v1.15.0
Types ¶
This section is empty.