skip

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlwaysSkipDirs = []string{".git", ".cache", ".forgotten"}

AlwaysSkipDirs contains directories that are always skipped regardless of SkipHidden setting. These directories should never be indexed as they contain: - .git: Version control data (huge and constantly changing) - .cache: Our own cache directory - .forgotten: Soft-deleted files (prevents re-indexing)

Functions

func ShouldSkip

func ShouldSkip(name string, isDir bool, cfg *Config) bool

ShouldSkip checks if any path (file or directory) should be skipped. For directories, use isDir=true. For files, use isDir=false.

func ShouldSkipDir

func ShouldSkipDir(name string, cfg *Config) bool

ShouldSkipDir checks if a directory should be skipped based on config. Always skips AlwaysSkipDirs regardless of SkipHidden setting.

func ShouldSkipFile

func ShouldSkipFile(name string, cfg *Config) bool

ShouldSkipFile checks if a file should be skipped based on config. Does not check directory path - only the file itself.

Types

type Config

type Config struct {
	SkipHidden     bool     // Skip hidden files/dirs (default: true)
	SkipDirs       []string // Directories to skip by name
	SkipFiles      []string // Files to skip by name
	SkipExtensions []string // Extensions to skip (e.g., ".zip")
}

Config contains skip pattern configuration. This is passed to walker and watcher for consistent skip behavior.

Jump to

Keyboard shortcuts

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