testutil: rename variables that collided with imports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0e3efe749b
commit
030489ca66
2 changed files with 11 additions and 11 deletions
|
@ -96,7 +96,7 @@ func CreateRandomLayers(n int) (map[digest.Digest]io.ReadSeeker, error) {
|
|||
// UploadBlobs lets you upload blobs to a repository
|
||||
func UploadBlobs(repository distribution.Repository, layers map[digest.Digest]io.ReadSeeker) error {
|
||||
ctx := context.Background()
|
||||
for digest, rs := range layers {
|
||||
for dgst, rs := range layers {
|
||||
wr, err := repository.Blobs(ctx).Create(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unexpected error creating upload: %v", err)
|
||||
|
@ -106,7 +106,7 @@ func UploadBlobs(repository distribution.Repository, layers map[digest.Digest]io
|
|||
return fmt.Errorf("unexpected error copying to upload: %v", err)
|
||||
}
|
||||
|
||||
if _, err := wr.Commit(ctx, distribution.Descriptor{Digest: digest}); err != nil {
|
||||
if _, err := wr.Commit(ctx, distribution.Descriptor{Digest: dgst}); err != nil {
|
||||
return fmt.Errorf("unexpected error committinng upload: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue