⚠ Migrate TwinProduction/gatus to TwiN/gatus
This commit is contained in:
12
vendor/github.com/TwiN/gocache/pattern.go
generated
vendored
Normal file
12
vendor/github.com/TwiN/gocache/pattern.go
generated
vendored
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
|
||||
}
|
Reference in New Issue
Block a user