Documentation
¶
Overview ¶
* Glimpse - Index Module * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: In-memory indexing system for fast code search * License: MIT License
* Glimpse - Search Engine Module * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: Core search functionality with file traversal and pattern matching * License: MIT License
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBinaryFile ¶
Types ¶
type FileEntry ¶
type FileEntry struct {
Path string // File path
Content []string // File lines (original)
Lower []string // File lines (lowercase for fast case-insensitive search)
ModTime time.Time // Last modification time
}
FileEntry represents a single indexed file with its content
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index represents an in-memory index of files in a directory
func BuildIndex ¶
BuildIndex creates an index of all text files in the given directory progressCallback is called with current and total during indexing
func (*Index) GetFileContent ¶
returns the cached content lines for a file Returns nil if file not found in index
type Result ¶
func SearchFiles ¶
func SearchFiles(pattern string, dir string, options SearchOptions) []Result