diff --git a/speedtest-extract/util.go b/speedtest-extract/util.go index 99be1ca..89c8072 100644 --- a/speedtest-extract/util.go +++ b/speedtest-extract/util.go @@ -6,6 +6,7 @@ import ( "fmt" "os" "strings" + "path/filepath" ) var ( @@ -20,7 +21,11 @@ var ( func contains(str string, list []string) bool { for _, entry := range list { - if entry == str { + match, err := filepath.Match(entry, str) + if err != nil { + continue // skip invalid patterns + } + if match { return true } }