Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMatches ¶
FileMatches groups all matches within a single file.
type GrepOptions ¶
type GrepOptions struct {
Pattern string
Path string
Type string // file type filter: "go", "js", "py", etc.
Glob string // glob pattern filter: "*.tsx", "src/**/*.go"
OutputMode string // "content" (default), "files_with_matches", "count"
CaseInsensitive bool
Context int // lines of context around match (-C)
After int // lines after match (-A)
Before int // lines before match (-B)
LineNumbers bool
HeadLimit int // limit output entries
Offset int // skip first N entries
Multiline bool
RespectGitignore *bool // nil = auto (true if in git repo), true/false = explicit
}
GrepOptions configures a grep operation.
type Match ¶
type Match struct {
Path string // file path (relative to search root)
LineNumber int // 1-based line number of the match
Column int // 0-based byte offset within the line
Line string // the matched line content (without trailing newline)
Before []string // context lines before the match
After []string // context lines after the match
}
Match represents a single match within a file.
type Results ¶
type Results struct {
Files []FileMatches // one entry per file with matches
TotalCount int // total matches across all files
Truncated bool // true if HeadLimit caused early termination
}
Results holds the complete output of a grep operation.
Click to show internal directories.
Click to hide internal directories.