Skip to content

Commit e10eca3

Browse files
committed
daemon/containerd: rename some vars that collided with imports
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent aefbd49 commit e10eca3

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

daemon/containerd/image_builder.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ import (
4242
// releasableLayer.Release() to prevent leaking of layers.
4343
func (i *ImageService) GetImageAndReleasableLayer(ctx context.Context, refOrID string, opts backend.GetImageAndLayerOptions) (builder.Image, builder.ROLayer, error) {
4444
if refOrID == "" { // from SCRATCH
45-
os := runtime.GOOS
45+
imgOS := runtime.GOOS
4646
if runtime.GOOS == "windows" {
47-
os = "linux"
47+
imgOS = "linux"
4848
}
4949
if opts.Platform != nil {
50-
os = opts.Platform.OS
50+
imgOS = opts.Platform.OS
5151
}
52-
if !system.IsOSSupported(os) {
52+
if !system.IsOSSupported(imgOS) {
5353
return nil, nil, system.ErrNotSupportedOperatingSystem
5454
}
5555
return nil, &rolayer{
@@ -390,12 +390,12 @@ func (i *ImageService) CreateImage(ctx context.Context, config []byte, parent st
390390
return nil, err
391391
}
392392

393-
rootfs := ocispec.RootFS{
393+
rootFS := ocispec.RootFS{
394394
Type: imgToCreate.RootFS.Type,
395395
DiffIDs: []digest.Digest{},
396396
}
397397
for _, diffId := range imgToCreate.RootFS.DiffIDs {
398-
rootfs.DiffIDs = append(rootfs.DiffIDs, digest.Digest(diffId))
398+
rootFS.DiffIDs = append(rootFS.DiffIDs, digest.Digest(diffId))
399399
}
400400
exposedPorts := make(map[string]struct{}, len(imgToCreate.Config.ExposedPorts))
401401
for k, v := range imgToCreate.Config.ExposedPorts {
@@ -424,7 +424,7 @@ func (i *ImageService) CreateImage(ctx context.Context, config []byte, parent st
424424
Labels: imgToCreate.Config.Labels,
425425
StopSignal: imgToCreate.Config.StopSignal,
426426
},
427-
RootFS: rootfs,
427+
RootFS: rootFS,
428428
History: imgToCreate.History,
429429
}
430430

daemon/containerd/image_import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ func compressAndWriteBlob(ctx context.Context, cs content.Store, compression arc
259259
writeChan := make(chan digest.Digest)
260260
// Start copying the blob to the content store from the pipe.
261261
go func() {
262-
digest, err := writeBlobAndReturnDigest(ctx, cs, mediaType, pr)
262+
dgst, err := writeBlobAndReturnDigest(ctx, cs, mediaType, pr)
263263
pr.CloseWithError(err)
264-
writeChan <- digest
264+
writeChan <- dgst
265265
}()
266266

267267
// Copy archive to the pipe and tee it to a digester.

0 commit comments

Comments
 (0)