Adding upstream version 2.2.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
a6909e3829
commit
02ef45af86
19 changed files with 3024 additions and 0 deletions
12
pattern.go
Normal file
12
pattern.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package gocache
|
||||
|
||||
import "path/filepath"
|
||||
|
||||
// MatchPattern checks whether a string matches a pattern
|
||||
func MatchPattern(pattern, s string) bool {
|
||||
if pattern == "*" {
|
||||
return true
|
||||
}
|
||||
matched, _ := filepath.Match(pattern, s)
|
||||
return matched
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue