diff options
| author | Eyal Posener <[email protected]> | 2017-05-11 20:48:40 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-11 20:48:40 +0300 |
| commit | 115e175c3d254b3a4797607821a0aab6f08058bb (patch) | |
| tree | 81a786eb45eef5c59f02bb8f731efaa1f926f97b /match/match.go | |
| parent | 967bae76f3132c210e6275653f9b603593973858 (diff) | |
Change Match to be a function
Diffstat (limited to 'match/match.go')
| -rw-r--r-- | match/match.go | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/match/match.go b/match/match.go index ae95549..812fcac 100644 --- a/match/match.go +++ b/match/match.go @@ -1,11 +1,6 @@ package match -import "fmt" - -// Matcher matches itself to a string -// it is used for comparing a given argument to the last typed -// word, and see if it is a possible auto complete option. -type Matcher interface { - fmt.Stringer - Match(prefix string) bool -} +// Match matches two strings +// it is used for comparing a term to the last typed +// word, the prefix, and see if it is a possible auto complete option. +type Match func(term, prefix string) bool |
