forked from TrueCloudLab/distribution
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:
parent
2bf5e1879e
commit
53757ea337
4 changed files with 43 additions and 29 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue