Documentation
¶
Index ¶
- Constants
- func InitModel(results []SearchResult, patternStr, replacement string, pattern *regexp.Regexp, ...) model
- func IsExcluded(path string, excludeList []string) bool
- func ParseExcludeList(excludeStr string) []string
- func ReplaceInFile(filePath string, resultsInFile []SearchResult, pattern *regexp.Regexp, ...) error
- type AppMode
- type AppState
- type SearchResult
Constants ¶
View Source
const ( ColorRed = lipgloss.Color("9") // Bright red for highlights ColorGreen = lipgloss.Color("10") // Bright green for replacements ColorCyan = lipgloss.Color("6") // Cyan for selection ColorGrey = lipgloss.Color("240") // Dark grey for help and less important text )
ANSI escape codes for coloring terminal output
Variables ¶
This section is empty.
Functions ¶
func InitModel ¶
func InitModel(results []SearchResult, patternStr, replacement string, pattern *regexp.Regexp, mode AppMode) model
InitModel returns a new model with the initial state
func IsExcluded ¶
Check if path matches any exclude pattern
func ParseExcludeList ¶
parseExcludeList parses comma separated exclude patterns
func ReplaceInFile ¶
func ReplaceInFile(filePath string, resultsInFile []SearchResult, pattern *regexp.Regexp, replacementStr string) error
replaceInFile reads a file, applies replacements to selected lines, and writes the result
Types ¶
type SearchResult ¶
SearchResult holds information about a found match
func PerformSearchAdaptive ¶
func PerformSearchAdaptive(rootPath string, pattern *regexp.Regexp, excludeList []string) ([]SearchResult, error)
Choose best approach based on file characteristics and exclusions
Click to show internal directories.
Click to hide internal directories.