From e01b7965323ae9f48f31947537c7bb68f59c9097 Mon Sep 17 00:00:00 2001 From: Ramon Saccilotto Date: Wed, 2 Mar 2022 12:32:27 +0100 Subject: [PATCH] Fix match any function to work for multiple patterns --- cmd/hot-reload/watch.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/hot-reload/watch.go b/cmd/hot-reload/watch.go index 1e874c5..4eb362d 100644 --- a/cmd/hot-reload/watch.go +++ b/cmd/hot-reload/watch.go @@ -175,7 +175,9 @@ func matchesAny(path string, patterns []string) bool { for _, pattern := range patterns { // use wildmatch-library for simple pattern matching matcher := wildmatch.NewWildMatch(pattern) - return matcher.IsMatch(path) + if matcher.IsMatch(path) { + return true + } } return false