github.com/argoproj/argo-cd@v1.8.7/util/glob/glob.go (about)

     1  package glob
     2  
     3  import (
     4  	"github.com/gobwas/glob"
     5  	log "github.com/sirupsen/logrus"
     6  )
     7  
     8  func Match(pattern, text string, separators ...rune) bool {
     9  	compiledGlob, err := glob.Compile(pattern, separators...)
    10  	if err != nil {
    11  		log.Warnf("failed to compile pattern %s due to error %v", pattern, err)
    12  		return false
    13  	}
    14  	return compiledGlob.Match(text)
    15  }