internal/registryclient: repositoryEndpoint: memoize repoName

- Parse/format the repository name when constructing and store the
  result.
- Remove the Name() accessor, as this type is only used internally,
  and no longer had any special handling.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-20 14:02:26 +02:00
parent b2b7187244
commit 2ce94e4fff
3 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ func (c *client) iterateEndpoints(ctx context.Context, namedRef reference.Named,
return err
}
repoName := reference.TrimNamed(namedRef)
repoName := reference.Path(reference.TrimNamed(namedRef))
indexInfo := registry.NewIndexInfo(namedRef)
confirmedTLSRegistries := make(map[string]bool)