pathutil

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Excluded added in v1.7.0

func Excluded(filePath string, ignorePaths, onlyPaths []string) bool

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 MatchesPath

func MatchesPath(pattern, filePath string) bool

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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