Documentation
¶
Overview ¶
Package ignore loads .codesearchignore (gitignore syntax) and walks the repo skipping ignored paths, oversized files, and binary content.
Index ¶
Constants ¶
View Source
const ( // DefaultMaxFileSize is the size cap applied when Walk is called with // maxFileSize == 0. DefaultMaxFileSize int64 = 1 * 1024 * 1024 // 1 MiB )
View Source
const IgnoreFileName = ".codesearchignore"
IgnoreFileName is the per-repo ignore file read by Load.
Variables ¶
This section is empty.
Functions ¶
func Walk ¶
Walk iterates the filesystem under root, skipping:
- directories matched by the Matcher,
- files matched by the Matcher,
- empty files,
- files larger than maxFileSize (or DefaultMaxFileSize when 0),
- files whose first 512 bytes contain a null byte (binary heuristic).
Paths passed to fn are repo-relative with forward slashes regardless of the host OS.
Types ¶
type Entry ¶
Entry is a file accepted by Walk: not ignored, not empty, not oversized, and not likely-binary.
Click to show internal directories.
Click to hide internal directories.