diff options
| author | Eyal Posener <[email protected]> | 2017-05-06 22:25:44 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-06 22:25:44 +0300 |
| commit | cc743aad8be84fa477d744e144c84ed75431ba3a (patch) | |
| tree | 505482bd32b4d833299d28ac48f3963fd8492b69 /match.go | |
| parent | c26ef096c7990a5ae97b503545fd76ff6df388d6 (diff) | |
Fix vet
Diffstat (limited to 'match.go')
| -rw-r--r-- | match.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -20,6 +20,7 @@ func (a MatchPrefix) String() string { return string(a) } +// Match returns true if a has the prefix as prefix func (a MatchPrefix) Match(prefix string) bool { return strings.HasPrefix(string(a), prefix) } @@ -32,6 +33,7 @@ func (a MatchFileName) String() string { return string(a) } +// Match returns true if prefix's abs path prefixes a's abs path func (a MatchFileName) Match(prefix string) bool { full, err := filepath.Abs(string(a)) if err != nil { |
