summaryrefslogtreecommitdiff
path: root/predict_set.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-11-04 11:52:49 +0200
committerGitHub <[email protected]>2017-11-04 11:52:49 +0200
commita1f9ea005b8360153429321071da4e42ce6ce323 (patch)
tree0f7976f712f3cb3c70eac8eb78b5027e445e16c8 /predict_set.go
parentaae7e1e39fb3554591e2d20b4c86fea9bf2b15bc (diff)
parent00c86494ff7035cfd62f66042e9ca2b118b90122 (diff)
Merge branch 'master' into split-last-equal
Diffstat (limited to 'predict_set.go')
-rw-r--r--predict_set.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/predict_set.go b/predict_set.go
index 8fc59d7..fa4a34a 100644
--- a/predict_set.go
+++ b/predict_set.go
@@ -1,7 +1,5 @@
package complete
-import "github.com/posener/complete/match"
-
// PredictSet expects specific set of terms, given in the options argument.
func PredictSet(options ...string) Predictor {
return predictSet(options)
@@ -9,11 +7,6 @@ func PredictSet(options ...string) Predictor {
type predictSet []string
-func (p predictSet) Predict(a Args) (prediction []string) {
- for _, m := range p {
- if match.Prefix(m, a.Last) {
- prediction = append(prediction, m)
- }
- }
- return
+func (p predictSet) Predict(a Args) []string {
+ return p
}