From 115e175c3d254b3a4797607821a0aab6f08058bb Mon Sep 17 00:00:00 2001 From: Eyal Posener Date: Thu, 11 May 2017 20:48:40 +0300 Subject: Change Match to be a function --- match/match.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'match/match.go') 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 -- cgit v1.2.3