From d6f83adb306068752bfaf561352df74c9f991210 Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Wed, 2 Nov 2016 09:15:11 -0700 Subject: [PATCH] match on prefix star, fixes #76w --- controller/glob/glob.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/glob/glob.go b/controller/glob/glob.go index 696214a7..72eb9a7f 100644 --- a/controller/glob/glob.go +++ b/controller/glob/glob.go @@ -1,5 +1,7 @@ package glob +import "strings" + type Glob struct { Pattern string Desc bool @@ -24,7 +26,7 @@ func IsGlob(pattern string) bool { func Parse(pattern string, desc bool) *Glob { g := &Glob{Pattern: pattern, Desc: desc, Limits: []string{"", ""}} - if pattern == "*" { + if strings.HasPrefix(pattern, "*") { g.IsGlob = true return g }