mirror of
https://github.com/distribution/distribution.git
synced 2025-09-24 04:27:01 +00:00
reference: ParseDockerRef: slight refactor, and update docs
- improve documentation - remove redundant error-check - simplify interface matching, which slightly improves readability - touch-up some docs Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -32,7 +32,7 @@ func FamiliarString(ref Reference) string {
|
||||
}
|
||||
|
||||
// FamiliarMatch reports whether ref matches the specified pattern.
|
||||
// See https://godoc.org/path#Match for supported patterns.
|
||||
// See [path.Match] for supported patterns.
|
||||
func FamiliarMatch(pattern string, ref Reference) (bool, error) {
|
||||
matched, err := path.Match(pattern, FamiliarString(ref))
|
||||
if namedRef, isNamed := ref.(Named); isNamed && !matched {
|
||||
|
Reference in New Issue
Block a user