MCPcopy Create free account
hub / github.com/containers/image / FamiliarMatch

Function FamiliarMatch

docker/reference/helpers.go:36–42  ·  view source on GitHub ↗

FamiliarMatch reports whether ref matches the specified pattern. See https://godoc.org/path#Match for supported patterns.

(pattern string, ref Reference)

Source from the content-addressed store, hash-verified

34// FamiliarMatch reports whether ref matches the specified pattern.
35// See https://godoc.org/path#Match for supported patterns.
36func FamiliarMatch(pattern string, ref Reference) (bool, error) {
37 matched, err := path.Match(pattern, FamiliarString(ref))
38 if namedRef, isNamed := ref.(Named); isNamed && !matched {
39 matched, _ = path.Match(pattern, FamiliarName(namedRef))
40 }
41 return matched, err
42}

Callers 2

TestMatchErrorFunction · 0.85
TestMatchFunction · 0.85

Calls 2

FamiliarStringFunction · 0.85
FamiliarNameFunction · 0.85

Tested by 2

TestMatchErrorFunction · 0.68
TestMatchFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…