From 32a4d8e39f41b225f1dbc59e0890ae29609ad4d8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Nov 2022 23:28:37 +0100 Subject: [PATCH] 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 (31a448a628b61bc50d4790b49c489b5747ebeca5), and it looks like it never had capturing groups, so this was just a mistake in the docs. Signed-off-by: Sebastiaan van Stijn --- reference/regexp.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reference/regexp.go b/reference/regexp.go index 2dfcd8f96..dd9e06b6c 100644 --- a/reference/regexp.go +++ b/reference/regexp.go @@ -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