From 91ac2e0dd920c0f629f4076202267afbac74a62c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 14 Oct 2018 00:30:20 -0700 Subject: [PATCH] go fmt --- weed/operation/chunked_file.go | 2 +- weed/operation/delete_content.go | 7 +++---- weed/operation/grpc_client.go | 4 ++-- weed/operation/lookup.go | 4 ++-- weed/server/common.go | 2 +- weed/server/master_grpc_server_lookup.go | 3 ++- weed/wdclient/vid_map.go | 1 - 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/weed/operation/chunked_file.go b/weed/operation/chunked_file.go index 69e9b758f..9d8267dee 100644 --- a/weed/operation/chunked_file.go +++ b/weed/operation/chunked_file.go @@ -10,8 +10,8 @@ import ( "sync" - "github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/weed/operation/delete_content.go b/weed/operation/delete_content.go index 2e414873f..ad842a4cb 100644 --- a/weed/operation/delete_content.go +++ b/weed/operation/delete_content.go @@ -1,15 +1,14 @@ package operation import ( + "context" "errors" + "fmt" + "net/http" "strings" "sync" - "net/http" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "context" - "fmt" ) type DeleteResult struct { diff --git a/weed/operation/grpc_client.go b/weed/operation/grpc_client.go index c27954c53..324166f93 100644 --- a/weed/operation/grpc_client.go +++ b/weed/operation/grpc_client.go @@ -2,12 +2,12 @@ package operation import ( "fmt" - "strings" "strconv" + "strings" "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" "github.com/chrislusf/seaweedfs/weed/util" ) diff --git a/weed/operation/lookup.go b/weed/operation/lookup.go index 25cc65c51..c495af1af 100644 --- a/weed/operation/lookup.go +++ b/weed/operation/lookup.go @@ -1,6 +1,7 @@ package operation import ( + "context" "encoding/json" "errors" "fmt" @@ -9,9 +10,8 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "context" + "github.com/chrislusf/seaweedfs/weed/util" ) type Location struct { diff --git a/weed/server/common.go b/weed/server/common.go index 22fe612e0..f1f2e4e4f 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -19,8 +19,8 @@ import ( "github.com/chrislusf/seaweedfs/weed/util" _ "github.com/chrislusf/seaweedfs/weed/statik" - statik "github.com/rakyll/statik/fs" "github.com/gorilla/mux" + statik "github.com/rakyll/statik/fs" ) var serverStats *stats.ServerStats diff --git a/weed/server/master_grpc_server_lookup.go b/weed/server/master_grpc_server_lookup.go index eae90f22c..05458f1cf 100644 --- a/weed/server/master_grpc_server_lookup.go +++ b/weed/server/master_grpc_server_lookup.go @@ -1,8 +1,9 @@ package weed_server import ( - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "context" + + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" ) func (ms *MasterServer) LookupVolume(ctx context.Context, req *master_pb.LookupVolumeRequest) (*master_pb.LookupVolumeResponse, error) { diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go index 166c05b0a..02c3efd17 100644 --- a/weed/wdclient/vid_map.go +++ b/weed/wdclient/vid_map.go @@ -66,7 +66,6 @@ func (vc *vidMap) LookupVolumeServer(fileId string) (volumeServer string, err er return serverUrl, nil } - func (vc *vidMap) GetLocations(vid uint32) (locations []Location) { vc.RLock() defer vc.RUnlock()