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/prefix.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'match/prefix.go') diff --git a/match/prefix.go b/match/prefix.go index d54902d..9a01ba6 100644 --- a/match/prefix.go +++ b/match/prefix.go @@ -3,13 +3,7 @@ package match import "strings" // Prefix is a simple Matcher, if the word is it's prefix, there is a match -type Prefix string - -func (a Prefix) String() string { - return string(a) -} - // Match returns true if a has the prefix as prefix -func (a Prefix) Match(prefix string) bool { - return strings.HasPrefix(string(a), prefix) +func Prefix(long, prefix string) bool { + return strings.HasPrefix(long, prefix) } -- cgit v1.2.3