From 0cc7ad0a7df75f166485978c1dcab597f3169177 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 25 Nov 2019 18:51:57 +0100 Subject: [PATCH] distribution: remove use of deprecated os.SEEK_END Signed-off-by: Sebastiaan van Stijn --- distribution/pull_v2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/pull_v2.go b/distribution/pull_v2.go index a9feafdac2..54b66d01a1 100644 --- a/distribution/pull_v2.go +++ b/distribution/pull_v2.go @@ -174,7 +174,7 @@ func (ld *v2LayerDescriptor) Download(ctx context.Context, progressOutput progre return nil, 0, xfer.DoNotRetry{Err: err} } } else { - offset, err = ld.tmpFile.Seek(0, os.SEEK_END) + offset, err = ld.tmpFile.Seek(0, io.SeekEnd) if err != nil { logrus.Debugf("error seeking to end of download file: %v", err) offset = 0 @@ -209,7 +209,7 @@ func (ld *v2LayerDescriptor) Download(ctx context.Context, progressOutput progre return nil, 0, err } } - size, err := layerDownload.Seek(0, os.SEEK_END) + size, err := layerDownload.Seek(0, io.SeekEnd) if err != nil { // Seek failed, perhaps because there was no Content-Length // header. This shouldn't fail the download, because we can