diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-10-13 22:38:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-13 22:38:58 -0700 |
| commit | 5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068 (patch) | |
| tree | bb21b4450e8611eed89d33dfdd46e4e6144bc00b /weed/operation/chunked_file.go | |
| parent | 46a09c60744eff104fdfc1a1fade38c5485f0dda (diff) | |
| parent | a23bcbb7ecf93fcda35976f4f2fb42a67830e718 (diff) | |
| download | seaweedfs-5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068.tar.xz seaweedfs-5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068.zip | |
Merge pull request #2381 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
Diffstat (limited to 'weed/operation/chunked_file.go')
| -rw-r--r-- | weed/operation/chunked_file.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/operation/chunked_file.go b/weed/operation/chunked_file.go index 0227db1bf..45068bbcc 100644 --- a/weed/operation/chunked_file.go +++ b/weed/operation/chunked_file.go @@ -4,9 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb" "io" - "io/ioutil" "net/http" "sort" "sync" @@ -14,6 +12,7 @@ import ( "google.golang.org/grpc" "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/util" ) @@ -108,7 +107,7 @@ func readChunkNeedle(fileUrl string, w io.Writer, offset int64, jwt string) (wri return written, err } defer func() { - io.Copy(ioutil.Discard, resp.Body) + io.Copy(io.Discard, resp.Body) resp.Body.Close() }() |
