Skip to content

Commit 32c77af

Browse files
committed
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 <[email protected]>
1 parent 53e18a9 commit 32c77af

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

reference/regexp.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ var (
99

1010
// separatorRegexp defines the separators allowed to be embedded in name
1111
// components. This allow one period, one or two underscore and multiple
12-
// dashes.
12+
// dashes. Repeated dashes and underscores are intentionally treated
13+
// differently. In order to support valid hostnames as name components,
14+
// supporting repeated dash was added. Additionally double underscore is
15+
// now allowed as a separator to loosen the restriction for previously
16+
// supported names.
1317
separatorRegexp = match(`(?:[._]|__|[-]*)`)
1418

1519
// nameComponentRegexp restricts registry path component names to start

0 commit comments

Comments
 (0)