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:
Sebastiaan van Stijn 2022-11-10 23:28:37 +01:00
parent 226b21beb6
commit 32a4d8e39f
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -96,9 +96,8 @@ var (
nameComponent = expression(alphanumeric, optional(repeated(separator, alphanumeric)))
namePat = expression(optional(domain, literal(`/`)), nameComponent, optional(repeated(literal(`/`), nameComponent)))
// NameRegexp is the format for the name component of references. The
// regexp has capturing groups for the domain and name part omitting
// the separating forward slash from either.
// NameRegexp is the format for the name component of references, including
// an optional domain and port, but without tag or digest suffix.
NameRegexp = regexp.MustCompile(namePat)
// anchoredNameRegexp is used to parse a name value, capturing the