Replace most usages of ioutil with the underlying function

The ioutil functions are deprecated since Go 1.17 and only wrap another
library function. Thus directly call the underlying function.

This commit only mechanically replaces the function calls.
This commit is contained in:
Michael Eischer 2022-12-02 19:36:43 +01:00
parent 2d5e28e777
commit ff7ef5007e
57 changed files with 119 additions and 159 deletions

View file

@ -3,7 +3,6 @@ package sftp_test
import (
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -34,7 +33,7 @@ func newTestSuite(t testing.TB) *test.Suite {
return &test.Suite{
// NewConfig returns a config for a new temporary backend that will be used in tests.
NewConfig: func() (interface{}, error) {
dir, err := ioutil.TempDir(rtest.TestTempDir, "restic-test-sftp-")
dir, err := os.MkdirTemp(rtest.TestTempDir, "restic-test-sftp-")
if err != nil {
t.Fatal(err)
}