mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
go fmt
This commit is contained in:
parent
e63317fb08
commit
c74dc2b306
|
@ -145,9 +145,9 @@ func checkCopyFiles(originFileInf *volume_server_pb.ReadVolumeFileStatusResponse
|
||||||
|
|
||||||
func writeToFile(client volume_server_pb.VolumeServer_CopyFileClient, fileName string, wt *util.WriteThrottler, isAppend bool) error {
|
func writeToFile(client volume_server_pb.VolumeServer_CopyFileClient, fileName string, wt *util.WriteThrottler, isAppend bool) error {
|
||||||
glog.V(4).Infof("writing to %s", fileName)
|
glog.V(4).Infof("writing to %s", fileName)
|
||||||
flags := os.O_WRONLY|os.O_CREATE|os.O_TRUNC
|
flags := os.O_WRONLY | os.O_CREATE | os.O_TRUNC
|
||||||
if isAppend {
|
if isAppend {
|
||||||
flags = os.O_WRONLY|os.O_CREATE
|
flags = os.O_WRONLY | os.O_CREATE
|
||||||
}
|
}
|
||||||
dst, err := os.OpenFile(fileName, flags, 0644)
|
dst, err := os.OpenFile(fileName, flags, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -93,7 +93,7 @@ func (vs *VolumeServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
ecVolume, hasEcVolume := vs.store.FindEcVolume(volumeId)
|
ecVolume, hasEcVolume := vs.store.FindEcVolume(volumeId)
|
||||||
|
|
||||||
if hasEcVolume {
|
if hasEcVolume {
|
||||||
count, err := vs.store.DeleteEcShardNeedle(context.Background(), ecVolume, n, cookie);
|
count, err := vs.store.DeleteEcShardNeedle(context.Background(), ecVolume, n, cookie)
|
||||||
writeDeleteResult(err, count, w, r)
|
writeDeleteResult(err, count, w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue