1
0
mirror of https://github.com/distribution/distribution synced 2024-11-06 19:35:52 +01:00

reference: splitDockerDomain: remove incorrect "TODO"

My mistake; I added this TODO in 552b1526c6821a84daab48cbc7f5456ae215d6c4, but it
only applies to familiarizeName.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-11-11 13:08:45 +01:00
parent 85d4039064
commit 8163e20c6f
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

@ -96,11 +96,6 @@ func splitDockerDomain(name string) (domain, remainder string) {
if domain == legacyDefaultDomain {
domain = defaultDomain
}
// TODO(thaJeztah): this check may be too strict, as it assumes the
// "library/" namespace does not have nested namespaces. While this
// is true (currently), technically it would be possible for Docker
// Hub to use those (e.g. "library/distros/ubuntu:latest").
// See https://github.com/distribution/distribution/pull/3769#issuecomment-1302031785.
if domain == defaultDomain && !strings.ContainsRune(remainder, '/') {
remainder = officialRepoPrefix + remainder
}