Rename Name method of Repository to Named
This makes code that gets the name as a string read like repo.Named().Name() instead of repo.Name().Name(). Requested in https://github.com/docker/docker/pull/19887#discussion_r51479753 Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
6c135e03ce
commit
6158eb544d
14 changed files with 36 additions and 36 deletions
|
@ -153,7 +153,7 @@ func (lbs *linkedBlobStore) Create(ctx context.Context, options ...distribution.
|
|||
startedAt := time.Now().UTC()
|
||||
|
||||
path, err := pathFor(uploadDataPathSpec{
|
||||
name: lbs.repository.Name().Name(),
|
||||
name: lbs.repository.Named().Name(),
|
||||
id: uuid,
|
||||
})
|
||||
|
||||
|
@ -162,7 +162,7 @@ func (lbs *linkedBlobStore) Create(ctx context.Context, options ...distribution.
|
|||
}
|
||||
|
||||
startedAtPath, err := pathFor(uploadStartedAtPathSpec{
|
||||
name: lbs.repository.Name().Name(),
|
||||
name: lbs.repository.Named().Name(),
|
||||
id: uuid,
|
||||
})
|
||||
|
||||
|
@ -182,7 +182,7 @@ func (lbs *linkedBlobStore) Resume(ctx context.Context, id string) (distribution
|
|||
context.GetLogger(ctx).Debug("(*linkedBlobStore).Resume")
|
||||
|
||||
startedAtPath, err := pathFor(uploadStartedAtPathSpec{
|
||||
name: lbs.repository.Name().Name(),
|
||||
name: lbs.repository.Named().Name(),
|
||||
id: id,
|
||||
})
|
||||
|
||||
|
@ -206,7 +206,7 @@ func (lbs *linkedBlobStore) Resume(ctx context.Context, id string) (distribution
|
|||
}
|
||||
|
||||
path, err := pathFor(uploadDataPathSpec{
|
||||
name: lbs.repository.Name().Name(),
|
||||
name: lbs.repository.Named().Name(),
|
||||
id: id,
|
||||
})
|
||||
|
||||
|
@ -298,7 +298,7 @@ func (lbs *linkedBlobStore) linkBlob(ctx context.Context, canonical distribution
|
|||
}
|
||||
seenDigests[dgst] = struct{}{}
|
||||
|
||||
blobLinkPath, err := linkPathFn(lbs.repository.Name().Name(), dgst)
|
||||
blobLinkPath, err := linkPathFn(lbs.repository.Named().Name(), dgst)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ func (lbs *linkedBlobStatter) Stat(ctx context.Context, dgst digest.Digest) (dis
|
|||
func (lbs *linkedBlobStatter) Clear(ctx context.Context, dgst digest.Digest) (err error) {
|
||||
// clear any possible existence of a link described in linkPathFns
|
||||
for _, linkPathFn := range lbs.linkPathFns {
|
||||
blobLinkPath, err := linkPathFn(lbs.repository.Name().Name(), dgst)
|
||||
blobLinkPath, err := linkPathFn(lbs.repository.Named().Name(), dgst)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ func (lbs *linkedBlobStatter) Clear(ctx context.Context, dgst digest.Digest) (er
|
|||
// linkPathFuncs to let us try a few different paths before returning not
|
||||
// found.
|
||||
func (lbs *linkedBlobStatter) resolveWithLinkFunc(ctx context.Context, dgst digest.Digest, linkPathFn linkPathFunc) (digest.Digest, error) {
|
||||
blobLinkPath, err := linkPathFn(lbs.repository.Name().Name(), dgst)
|
||||
blobLinkPath, err := linkPathFn(lbs.repository.Named().Name(), dgst)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue