1
0
Fork 0

Adding upstream version 2.2.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-16 22:45:16 +02:00
parent a6909e3829
commit 02ef45af86
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
19 changed files with 3024 additions and 0 deletions

12
pattern.go Normal file
View 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
}