diff options
Diffstat (limited to 'weed/remote_storage')
| -rw-r--r-- | weed/remote_storage/azure/azure_storage_client.go | 12 | ||||
| -rw-r--r-- | weed/remote_storage/gcs/gcs_storage_client.go | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/weed/remote_storage/azure/azure_storage_client.go b/weed/remote_storage/azure/azure_storage_client.go index 2fab3adb7..1a259a3e2 100644 --- a/weed/remote_storage/azure/azure_storage_client.go +++ b/weed/remote_storage/azure/azure_storage_client.go @@ -3,17 +3,17 @@ package azure import ( "context" "fmt" + "io" + "net/url" + "os" + "reflect" + "github.com/Azure/azure-storage-blob-go/azblob" "github.com/chrislusf/seaweedfs/weed/filer" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/pb/remote_pb" "github.com/chrislusf/seaweedfs/weed/remote_storage" "github.com/chrislusf/seaweedfs/weed/util" - "io" - "io/ioutil" - "net/url" - "os" - "reflect" ) func init() { @@ -115,7 +115,7 @@ func (az *azureRemoteStorageClient) ReadFile(loc *remote_pb.RemoteStorageLocatio bodyStream := downloadResponse.Body(azblob.RetryReaderOptions{MaxRetryRequests: 20}) defer bodyStream.Close() - data, err = ioutil.ReadAll(bodyStream) + data, err = io.ReadAll(bodyStream) if err != nil { return nil, fmt.Errorf("failed to download file %s%s: %v", loc.Bucket, loc.Path, err) diff --git a/weed/remote_storage/gcs/gcs_storage_client.go b/weed/remote_storage/gcs/gcs_storage_client.go index fce7ba945..788d4b1e0 100644 --- a/weed/remote_storage/gcs/gcs_storage_client.go +++ b/weed/remote_storage/gcs/gcs_storage_client.go @@ -1,9 +1,13 @@ package gcs import ( - "cloud.google.com/go/storage" "context" "fmt" + "io" + "os" + "reflect" + + "cloud.google.com/go/storage" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/pb/remote_pb" @@ -11,10 +15,6 @@ import ( "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/api/iterator" "google.golang.org/api/option" - "io" - "io/ioutil" - "os" - "reflect" ) func init() { @@ -110,7 +110,7 @@ func (gcs *gcsRemoteStorageClient) ReadFile(loc *remote_pb.RemoteStorageLocation if readErr != nil { return nil, readErr } - data, err = ioutil.ReadAll(rangeReader) + data, err = io.ReadAll(rangeReader) if err != nil { return nil, fmt.Errorf("failed to download file %s%s: %v", loc.Bucket, loc.Path, err) |
