diff options
| author | yourchanges <yourchanges@gmail.com> | 2015-01-10 02:51:26 +0800 |
|---|---|---|
| committer | yourchanges <yourchanges@gmail.com> | 2015-01-10 02:51:26 +0800 |
| commit | 9601880e323bbdf9540f2c79fb21d66374245b50 (patch) | |
| tree | 14fd3b36a89955ec6e0be6d51186031e978b519d /go/operation | |
| parent | f7bcd8e958ef185baeca0c455a397d49fcb62256 (diff) | |
| parent | 2c1a846279c172bcae457e70efa142c29a18892e (diff) | |
| download | seaweedfs-9601880e323bbdf9540f2c79fb21d66374245b50.tar.xz seaweedfs-9601880e323bbdf9540f2c79fb21d66374245b50.zip | |
Merge pull request #2 from chrislusf/master
merge
Diffstat (limited to 'go/operation')
| -rw-r--r-- | go/operation/assign_file_id.go | 5 | ||||
| -rw-r--r-- | go/operation/data_struts.go | 2 | ||||
| -rw-r--r-- | go/operation/delete_content.go | 3 | ||||
| -rw-r--r-- | go/operation/list_masters.go | 3 | ||||
| -rw-r--r-- | go/operation/lookup.go | 9 | ||||
| -rw-r--r-- | go/operation/submit.go | 3 | ||||
| -rw-r--r-- | go/operation/system_message.pb.go | 2 | ||||
| -rw-r--r-- | go/operation/system_message_test.go | 3 | ||||
| -rw-r--r-- | go/operation/upload_content.go | 3 |
9 files changed, 21 insertions, 12 deletions
diff --git a/go/operation/assign_file_id.go b/go/operation/assign_file_id.go index 4e72ad939..672bfa99c 100644 --- a/go/operation/assign_file_id.go +++ b/go/operation/assign_file_id.go @@ -1,12 +1,13 @@ package operation import ( - "github.com/chrislusf/weed-fs/go/glog" - "github.com/chrislusf/weed-fs/go/util" "encoding/json" "errors" "net/url" "strconv" + + "github.com/chrislusf/weed-fs/go/glog" + "github.com/chrislusf/weed-fs/go/util" ) type AssignResult struct { diff --git a/go/operation/data_struts.go b/go/operation/data_struts.go index 09fab05d1..4980f9913 100644 --- a/go/operation/data_struts.go +++ b/go/operation/data_struts.go @@ -1,7 +1,5 @@ package operation -import () - type JoinResult struct { VolumeSizeLimit uint64 `json:"VolumeSizeLimit,omitempty"` Error string `json:"error,omitempty"` diff --git a/go/operation/delete_content.go b/go/operation/delete_content.go index 84391b634..416a852b3 100644 --- a/go/operation/delete_content.go +++ b/go/operation/delete_content.go @@ -1,12 +1,13 @@ package operation import ( - "github.com/chrislusf/weed-fs/go/util" "encoding/json" "errors" "net/url" "strings" "sync" + + "github.com/chrislusf/weed-fs/go/util" ) type DeleteResult struct { diff --git a/go/operation/list_masters.go b/go/operation/list_masters.go index 7d46a9ebc..7ada94243 100644 --- a/go/operation/list_masters.go +++ b/go/operation/list_masters.go @@ -1,9 +1,10 @@ package operation import ( + "encoding/json" + "github.com/chrislusf/weed-fs/go/glog" "github.com/chrislusf/weed-fs/go/util" - "encoding/json" ) type ClusterStatusResult struct { diff --git a/go/operation/lookup.go b/go/operation/lookup.go index ebf153d27..70bc7146e 100644 --- a/go/operation/lookup.go +++ b/go/operation/lookup.go @@ -1,14 +1,15 @@ package operation import ( - "github.com/chrislusf/weed-fs/go/util" "encoding/json" "errors" - _ "fmt" + "fmt" "math/rand" "net/url" "strings" "time" + + "github.com/chrislusf/weed-fs/go/util" ) type Location struct { @@ -21,6 +22,10 @@ type LookupResult struct { Error string `json:"error,omitempty"` } +func (lr *LookupResult) String() string { + return fmt.Sprintf("VolumeId:%s, Locations:%v, Error:%s", lr.VolumeId, lr.Locations, lr.Error) +} + var ( vc VidCache ) diff --git a/go/operation/submit.go b/go/operation/submit.go index 3e09c2edf..62db46617 100644 --- a/go/operation/submit.go +++ b/go/operation/submit.go @@ -2,13 +2,14 @@ package operation import ( "bytes" - "github.com/chrislusf/weed-fs/go/glog" "io" "mime" "os" "path" "strconv" "strings" + + "github.com/chrislusf/weed-fs/go/glog" ) type FilePart struct { diff --git a/go/operation/system_message.pb.go b/go/operation/system_message.pb.go index 9f00dd74d..6f0f974c5 100644 --- a/go/operation/system_message.pb.go +++ b/go/operation/system_message.pb.go @@ -14,7 +14,7 @@ It has these top-level messages: */ package operation -import proto "code.google.com/p/goprotobuf/proto" +import "github.com/golang/protobuf/proto" import math "math" // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/operation/system_message_test.go b/go/operation/system_message_test.go index 2731d0b2f..d18ca49a4 100644 --- a/go/operation/system_message_test.go +++ b/go/operation/system_message_test.go @@ -1,10 +1,11 @@ package operation import ( - proto "code.google.com/p/goprotobuf/proto" "encoding/json" "log" "testing" + + "github.com/golang/protobuf/proto" ) func TestSerialDeserial(t *testing.T) { diff --git a/go/operation/upload_content.go b/go/operation/upload_content.go index 38737702d..480d76dca 100644 --- a/go/operation/upload_content.go +++ b/go/operation/upload_content.go @@ -2,7 +2,6 @@ package operation import ( "bytes" - "github.com/chrislusf/weed-fs/go/glog" "encoding/json" "errors" "fmt" @@ -14,6 +13,8 @@ import ( "net/textproto" "path/filepath" "strings" + + "github.com/chrislusf/weed-fs/go/glog" ) type UploadResult struct { |
