Skip to content

Commit

Permalink
Use MatchString directly
Browse files Browse the repository at this point in the history
  • Loading branch information
suzaku committed Aug 15, 2019
1 parent 949e32b commit a651715
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions match.go
@@ -1,11 +1,12 @@
package main

import (
"github.com/lithammer/fuzzysearch/fuzzy"
"os"
"path/filepath"
"regexp"
"strings"

"github.com/lithammer/fuzzysearch/fuzzy"
)

type matcher func([]*entry, []string) []string
Expand Down Expand Up @@ -69,7 +70,7 @@ var matchAnywhere = func(entries []*entry, args []string) []string {
}

for _, e := range entries {
if pattern.Match([]byte(e.val)) {
if pattern.MatchString(e.val) {
matches = append(matches, e.val)
}
}
Expand Down

0 comments on commit a651715

Please sign in to comment.