mirror of
https://github.com/restic/restic.git
synced 2025-08-21 10:57:55 +00:00
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:
@@ -3,7 +3,6 @@ package archiver
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -21,7 +20,7 @@ func createTestFiles(t testing.TB, num int) (files []string, cleanup func()) {
|
||||
|
||||
for i := 0; i < 15; i++ {
|
||||
filename := fmt.Sprintf("testfile-%d", i)
|
||||
err := ioutil.WriteFile(filepath.Join(tempdir, filename), []byte(filename), 0600)
|
||||
err := os.WriteFile(filepath.Join(tempdir, filename), []byte(filename), 0600)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user