1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-05 18:13:17 +00:00

Replace deprecated ioutil

As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.
This commit is contained in:
albertony
2022-08-20 16:38:02 +02:00
committed by Nick Craig-Wood
parent 776e5ea83a
commit 5d6b8141ec
108 changed files with 295 additions and 359 deletions

View File

@@ -23,7 +23,7 @@ package vfs
import (
"context"
"fmt"
"io/ioutil"
"io"
"os"
"path"
"sort"
@@ -697,7 +697,7 @@ func (vfs *VFS) ReadFile(filename string) (b []byte, err error) {
return nil, err
}
defer fs.CheckClose(f, &err)
return ioutil.ReadAll(f)
return io.ReadAll(f)
}
// AddVirtual adds the object (file or dir) to the directory cache