searcher

package
v0.0.0-...-215fdc0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Found

type Found struct {
	FileName   string
	LineNum    int
	FolderName string
	MatchText  string
	Error      error
}

Found represents a found match within a file, including the file name, line number, proxy name, and the text that matched.

func SearchInDirectory

func SearchInDirectory(directory, pattern string) ([]Found, error)

SearchInDirectory searches for a pattern in all files within a directory (recursively) and returns a slice of Found structs detailing where the pattern was found.

func SearchInFile

func SearchInFile(filePath, pattern, folderName string) ([]Found, error)

SearchInFile searches for a pattern in a file and returns a slice of Found detailing where the pattern was found.

Jump to

Keyboard shortcuts

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