From d37c3ab7a5e26054f78f3c6734cf57cebb1f43bd Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 18 Feb 2019 18:03:27 -0800 Subject: [PATCH] adjust error message --- weed/server/volume_grpc_sync.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/weed/server/volume_grpc_sync.go b/weed/server/volume_grpc_sync.go index 5f56ec17d..0114b38a4 100644 --- a/weed/server/volume_grpc_sync.go +++ b/weed/server/volume_grpc_sync.go @@ -14,7 +14,7 @@ func (vs *VolumeServer) VolumeSyncStatus(ctx context.Context, req *volume_server v := vs.store.GetVolume(storage.VolumeId(req.VolumdId)) if v == nil { - return nil, fmt.Errorf("Not Found Volume Id %d", req.VolumdId) + return nil, fmt.Errorf("not found volume id %d", req.VolumdId) } resp := v.GetVolumeSyncStatus() @@ -29,7 +29,7 @@ func (vs *VolumeServer) VolumeSyncIndex(req *volume_server_pb.VolumeSyncIndexReq v := vs.store.GetVolume(storage.VolumeId(req.VolumdId)) if v == nil { - return fmt.Errorf("Not Found Volume Id %d", req.VolumdId) + return fmt.Errorf("not found volume id %d", req.VolumdId) } content, err := v.IndexFileContent() @@ -59,11 +59,11 @@ func (vs *VolumeServer) VolumeSyncData(req *volume_server_pb.VolumeSyncDataReque v := vs.store.GetVolume(storage.VolumeId(req.VolumdId)) if v == nil { - return fmt.Errorf("Not Found Volume Id %d", req.VolumdId) + return fmt.Errorf("not found volume id %d", req.VolumdId) } if uint32(v.SuperBlock.CompactRevision) != req.Revision { - return fmt.Errorf("Requested Volume Revision is %d, but current revision is %d", req.Revision, v.SuperBlock.CompactRevision) + return fmt.Errorf("requested volume revision is %d, but current revision is %d", req.Revision, v.SuperBlock.CompactRevision) } content, err := storage.ReadNeedleBlob(v.DataFile(), int64(req.Offset)*types.NeedlePaddingSize, req.Size, v.Version()) @@ -78,7 +78,7 @@ func (vs *VolumeServer) VolumeSyncData(req *volume_server_pb.VolumeSyncDataReque n := new(storage.Needle) n.ParseNeedleHeader(content) if id != n.Id { - return fmt.Errorf("Expected file entry id %d, but found %d", id, n.Id) + return fmt.Errorf("expected file entry id %d, but found %d", id, n.Id) } if err != nil {