distribution: remove use of deprecated os.SEEK_END
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8840071c26
commit
0cc7ad0a7d
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue