mirror of
https://github.com/restic/restic.git
synced 2025-08-15 00:57:27 +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
internal/cache/file.go
vendored
3
internal/cache/file.go
vendored
@@ -2,7 +2,6 @@ package cache
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -106,7 +105,7 @@ func (c *Cache) Save(h restic.Handle, rd io.Reader) error {
|
||||
|
||||
// First save to a temporary location. This allows multiple concurrent
|
||||
// restics to use a single cache dir.
|
||||
f, err := ioutil.TempFile(dir, "tmp-")
|
||||
f, err := os.CreateTemp(dir, "tmp-")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user