summaryrefslogtreecommitdiff
path: root/match/match.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-11 20:54:26 +0300
committerGitHub <[email protected]>2017-05-11 20:54:26 +0300
commitd3bbb859d52b45987e3cd2098e28423f32edd999 (patch)
tree4265893d0c665ba0e763482a70c9044fa983a1ed /match/match.go
parentdd2171d085ef5957a1c5c0794d6007822e47849b (diff)
parentba23c350c73d2dfdf071c14c22152bcaf7e7fd7b (diff)
Merge pull request #12 from posener/improves
Enhance program structure and data structures
Diffstat (limited to 'match/match.go')
-rw-r--r--match/match.go13
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