filter

package
v0.0.0-...-ac40075 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Search(string, *SearchOption) ([]SearchResult, error)
}

func NewFilter

func NewFilter(option *SearchOption) Filter

type SearchCommand

type SearchCommand int
const (
	RipGrep SearchCommand = iota
	FuzzySearch
	NoneCommand
)

func CommandByName

func CommandByName(v string) (SearchCommand, error)

type SearchMode

type SearchMode int
const (
	Regex SearchMode = iota
	HeadMatch
	WordMatch
	NoneMode
)

func ModeByName

func ModeByName(v string) (SearchMode, error)

type SearchOption

type SearchOption struct {
	Command   SearchCommand
	Mode      SearchMode
	Case      bool
	TargetDir string
	Limit     int
}

type SearchResult

type SearchResult struct {
	FileName string
	LineNum  int
	Text     string
}

Jump to

Keyboard shortcuts

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