diff options
Diffstat (limited to 'vendor/github.com/posener/complete/match/prefix.go')
-rw-r--r-- | vendor/github.com/posener/complete/match/prefix.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/posener/complete/match/prefix.go b/vendor/github.com/posener/complete/match/prefix.go new file mode 100644 index 0000000..9a01ba6 --- /dev/null +++ b/vendor/github.com/posener/complete/match/prefix.go | |||
@@ -0,0 +1,9 @@ | |||
1 | package match | ||
2 | |||
3 | import "strings" | ||
4 | |||
5 | // Prefix is a simple Matcher, if the word is it's prefix, there is a match | ||
6 | // Match returns true if a has the prefix as prefix | ||
7 | func Prefix(long, prefix string) bool { | ||
8 | return strings.HasPrefix(long, prefix) | ||
9 | } | ||