Browse Source

go fmt

pull/1172/head
Chris Lu 5 years ago
parent
commit
eecad6062a
  1. 8
      weed/shell/command_volume_tier_download.go
  2. 2
      weed/storage/backend/s3_backend/s3_download.go
  3. 2
      weed/storage/backend/s3_backend/s3_sessions.go

8
weed/shell/command_volume_tier_download.go

@ -109,8 +109,8 @@ func doVolumeTierDownload(ctx context.Context, commandEnv *CommandEnv, writer io
// copy the .dat file from remote tier to local
err = downloadDatFromRemoteTier(ctx, commandEnv.option.GrpcDialOption, writer, needle.VolumeId(vid), collection, loc.Url)
if err != nil {
return fmt.Errorf("download dat file for volume %d to %s: %v", vid, loc.Url, err)
}
return fmt.Errorf("download dat file for volume %d to %s: %v", vid, loc.Url, err)
}
}
return nil
@ -120,8 +120,8 @@ func downloadDatFromRemoteTier(ctx context.Context, grpcDialOption grpc.DialOpti
err := operation.WithVolumeServerClient(targetVolumeServer, grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
stream, downloadErr := volumeServerClient.VolumeTierMoveDatFromRemote(ctx, &volume_server_pb.VolumeTierMoveDatFromRemoteRequest{
VolumeId: uint32(volumeId),
Collection: collection,
VolumeId: uint32(volumeId),
Collection: collection,
})
var lastProcessed int64

2
weed/storage/backend/s3_backend/s3_download.go

@ -42,7 +42,7 @@ func downloadFromS3(sess s3iface.S3API, destFileName string, sourceBucket string
}
// Download the file from S3.
fileSize, err = downloader.Download(fileWriter,&s3.GetObjectInput{
fileSize, err = downloader.Download(fileWriter, &s3.GetObjectInput{
Bucket: aws.String(sourceBucket),
Key: aws.String(sourceKey),
})

2
weed/storage/backend/s3_backend/s3_sessions.go

@ -59,4 +59,4 @@ func deleteFromS3(sess s3iface.S3API, sourceBucket string, sourceKey string) (er
Key: aws.String(sourceKey),
})
return err
}
}
Loading…
Cancel
Save