autocomplete

package
v0.0.0-...-a4ae846 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MIN_RANK = -10000

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoComplete

type AutoComplete struct {
	Dict *Dictionary
}

func Create

func Create() *AutoComplete

func (*AutoComplete) GetMatches

func (ac *AutoComplete) GetMatches(pattern string, count int) []*pq.Item

type Dictionary

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

func (*Dictionary) Add

func (dict *Dictionary) Add(word string)

func (*Dictionary) AddAll

func (dict *Dictionary) AddAll(words []string)

func (*Dictionary) Clear

func (dict *Dictionary) Clear()

func (*Dictionary) Count

func (dict *Dictionary) Count() int

func (*Dictionary) ForSomeWords

func (dict *Dictionary) ForSomeWords(callback func(string, string, int) bool)

func (*Dictionary) List

func (dict *Dictionary) List() []string

func (*Dictionary) Remove

func (dict *Dictionary) Remove(word string)

Jump to

Keyboard shortcuts

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