mirror of
https://github.com/distribution/distribution.git
synced 2025-08-31 06:34:11 +00:00
reference: fix docs for NameRegexp
NameRegexp does not have capturing groups, so updating the documentation
to reflect that.
To verify if this was an unintentional regression, I looked up the commit
that introduced this regex (31a448a628
), and
it looks like it never had capturing groups, so this was just a mistake in
the docs.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -96,9 +96,8 @@ var (
|
|||||||
nameComponent = expression(alphanumeric, optional(repeated(separator, alphanumeric)))
|
nameComponent = expression(alphanumeric, optional(repeated(separator, alphanumeric)))
|
||||||
namePat = expression(optional(domain, literal(`/`)), nameComponent, optional(repeated(literal(`/`), nameComponent)))
|
namePat = expression(optional(domain, literal(`/`)), nameComponent, optional(repeated(literal(`/`), nameComponent)))
|
||||||
|
|
||||||
// NameRegexp is the format for the name component of references. The
|
// NameRegexp is the format for the name component of references, including
|
||||||
// regexp has capturing groups for the domain and name part omitting
|
// an optional domain and port, but without tag or digest suffix.
|
||||||
// the separating forward slash from either.
|
|
||||||
NameRegexp = regexp.MustCompile(namePat)
|
NameRegexp = regexp.MustCompile(namePat)
|
||||||
|
|
||||||
// anchoredNameRegexp is used to parse a name value, capturing the
|
// anchoredNameRegexp is used to parse a name value, capturing the
|
||||||
|
Reference in New Issue
Block a user