func (rURI *RepoURI) Matches(pattern string) bool {
	// if we have an 'everything' pattern, return true immediatly
	if pattern == "" || pattern == "*" {
		return true
	}

	components := rURI.Components()
	componentsLength := len(components)

	// parse components of strings and ignore any casing

	puri, es := NewRepoURI(pattern)
	if es != nil {
		return false
	}

	patternComponents := puri.Components()
	patternLength := len(patternComponents)
	thePattern := strings.Join(patternComponents, "/")

	// try and match all te sub patterns
	for i := 0; i <= componentsLength-patternLength; i++ {
		subString := strings.Join(components[i:i+patternLength], "/")
		if fnmatch.Match(thePattern, subString, fnmatch.FNM_IGNORECASE) {
			return true
		}
	}

	return false
}
// Matches checks if a repiository URI matches a given pattern
Matches checks if a repiository URI matches a given pattern
// Matches checks if a repiository URI matches a given pattern
func (rURI *RepoURI) Matches(pattern string) bool {
	if pattern == "" || pattern == "*" {
		return true
	}
	components := rURI.Components()
	componentsLength := len(components)
	puri, es := NewRepoURI(pattern)
	if es != nil {
		return false
	}
	patternComponents := puri.Components()
	patternLength := len(patternComponents)
	thePattern := strings.Join(patternComponents, "/")
	for i := 0; i <= componentsLength-patternLength; i++ {
		subString := strings.Join(components[i:i+patternLength], "/")
		if fnmatch.Match(thePattern, subString, fnmatch.FNM_IGNORECASE) {
			return true
		}
	}
	return false
}
func ( rURI * RepoURI ) Matches ( pattern string ) bool { if pattern == " " || pattern == " " { return true } components := rURI . Components ( ) componentsLength := len ( components ) puri , es := NewRepoURI ( pattern ) if es != nil { return false } patternComponents := puri . Components ( ) patternLength := len ( patternComponents ) thePattern := strings . Join ( patternComponents , " " ) for i := 0 ; i <= componentsLength - patternLength ; i ++ { subString := strings . Join ( components [ i : i + patternLength ] , " " ) if fnmatch . Match ( thePattern , subString , fnmatch . FNM_IGNORECASE ) { return true } } return false }
Matches checks if a repiository URI matches a given pattern
Matches checks if a repiository URI matches a given pattern
// if we have an 'everything' pattern, return true immediatly // parse components of strings and ignore any casing // try and match all te sub patterns