fuzzyfinder

package
v2.25.1-5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAbort = fuzzyfinder.ErrAbort

Functions

func PreviewPackage added in v2.14.0

func PreviewPackage(p *Package) string

func PreviewVersion added in v2.14.0

func PreviewVersion(v *Version) string

Types

type Finder

type Finder struct{}

func New

func New() *Finder

func (*Finder) Find

func (f *Finder) Find(items []*Item, hasPreview bool) (int, error)

func (*Finder) FindMulti added in v2.12.1

func (f *Finder) FindMulti(items []*Item, hasPreview bool) ([]int, error)

type Item added in v2.12.1

type Item struct {
	Item    string
	Preview string
}

func ConvertStringsToItems added in v2.14.0

func ConvertStringsToItems(arr []string) []*Item

type MockFuzzyFinder

type MockFuzzyFinder struct {
	// contains filtered or unexported fields
}

func NewMock

func NewMock(idxs []int, err error) *MockFuzzyFinder

func (*MockFuzzyFinder) Find

func (f *MockFuzzyFinder) Find(items []*Item, hasPreview bool) (int, error)

func (*MockFuzzyFinder) FindMulti added in v2.12.1

func (f *MockFuzzyFinder) FindMulti(items []*Item, hasPreview bool) ([]int, error)

type Package

type Package struct {
	PackageInfo  *registry.PackageInfo
	RegistryName string
	Version      string
}

func (*Package) Item added in v2.12.1

func (p *Package) Item() string

func (*Package) Preview added in v2.12.1

func (p *Package) Preview(w int) string

type Version

type Version struct {
	Name        string
	Version     string
	Description string
	URL         string
}

func (*Version) Item added in v2.12.1

func (v *Version) Item() string

func (*Version) Preview added in v2.12.1

func (v *Version) Preview(w int) string

Jump to

Keyboard shortcuts

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