search

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecursiveSearchFiles

func RecursiveSearchFiles(query, currentDir string, showHidden bool, shouldIgnoreFn func(string) bool, cancelChan <-chan struct{}, onProgress func(scanned int), maxResults, maxDepth, maxFilesScanned int, customSkipDirs []string) ([]Result, []MatchResult)

RecursiveSearchFiles searches for files recursively using substring matching with streaming results Limits configurable via maxResults, maxDepth, maxFilesScanned parameters Results are sent via callback as they're found, allowing progressive display customSkipDirs are user-configurable directories to skip (merged with hardcoded essentials)

Types

type MatchResult

type MatchResult struct {
	Index          int
	MatchedIndexes []int
}

MatchResult contains fuzzy match information

func SubstringMatchNames added in v1.0.3

func SubstringMatchNames(query string, names []string) []MatchResult

SubstringMatchNames performs case-insensitive substring matching on a list of names Returns the indices of matches and their matched character positions

type Result

type Result struct {
	Path        string
	DisplayName string
	IsDir       bool
	Size        int64
	ModTime     time.Time
	LineNumber  int // For content searches
}

Result represents a search result with path and display name

func SearchFileContent

func SearchFileContent(query, currentDir string, showHidden bool, cancelChan <-chan struct{}) ([]Result, error)

SearchFileContent searches for content within files using ripgrep Limits: Max depth 5, max 2000 results, 30 second timeout

Jump to

Keyboard shortcuts

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