Merge pull request #4063 from MichaelEischer/replace-ioutil-usage

Replace ioutil usage
This commit is contained in:
Michael Eischer
2022-12-02 21:49:40 +01:00
committed by GitHub
59 changed files with 122 additions and 165 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"hash"
"io"
"io/ioutil"
"net/http"
"os"
"path"
@@ -296,7 +295,7 @@ func (be *Backend) Save(ctx context.Context, h restic.Handle, rd restic.RewindRe
opts.PartSize = 200 * 1024 * 1024
debug.Log("PutObject(%v, %v, %v)", be.cfg.Bucket, objName, rd.Length())
info, err := be.client.PutObject(ctx, be.cfg.Bucket, objName, ioutil.NopCloser(rd), int64(rd.Length()), opts)
info, err := be.client.PutObject(ctx, be.cfg.Bucket, objName, io.NopCloser(rd), int64(rd.Length()), opts)
debug.Log("%v -> %v bytes, err %#v: %v", objName, info.Size, err, err)