filter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasBinaryExtension

func HasBinaryExtension(path string) bool

func IsBinaryFile

func IsBinaryFile(path string) (bool, error)

func IsHardSkipDir

func IsHardSkipDir(name string) bool

func IsHardSkipFile

func IsHardSkipFile(name string) bool

func IsSecretLike

func IsSecretLike(relPath string) bool

func NormalizePath

func NormalizePath(path string) string

Types

type GitIgnore

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

func LoadGitIgnore

func LoadGitIgnore(root string) GitIgnore

func (GitIgnore) Match

func (g GitIgnore) Match(relPath string, isDir bool) bool

type Matcher

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

func NewMatcher

func NewMatcher(opts Options) Matcher

func (Matcher) AcceptPath

func (m Matcher) AcceptPath(relPath string, isDir bool) (bool, error)

type Options

type Options struct {
	IncludePatterns  []string
	ExcludePatterns  []string
	UseGitIgnore     bool
	ApplySafetyRules bool
	Root             string
}

type PatternSet

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

func NewPatternSet

func NewPatternSet(patterns []string) PatternSet

func (PatternSet) Empty

func (s PatternSet) Empty() bool

func (PatternSet) Match

func (s PatternSet) Match(relPath string, isDir bool) (bool, error)

Jump to

Keyboard shortcuts

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