Clarify repo name regex intention

Add context to comment to explain the repo name regex in addition to describing it.

Signed-off-by: David Warshaw <david.warshaw@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Dave 2020-07-09 10:43:10 -04:00 committed by Sebastiaan van Stijn
parent 2a8a53178c
commit 98ff272654
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -25,7 +25,11 @@ var (
// separatorRegexp defines the separators allowed to be embedded in name
// components. This allow one period, one or two underscore and multiple
// dashes.
// dashes. Repeated dashes and underscores are intentionally treated
// differently. In order to support valid hostnames as name components,
// supporting repeated dash was added. Additionally double underscore is
// now allowed as a separator to loosen the restriction for previously
// supported names.
separatorRegexp = match(`(?:[._]|__|[-]*)`)
// nameComponentRegexp restricts registry path component names to start