aboutsummaryrefslogtreecommitdiff
path: root/go/operation/lookup.go
diff options
context:
space:
mode:
authoryanyiwu <i@yanyiwu.com>2015-01-08 15:54:50 +0800
committeryanyiwu <i@yanyiwu.com>2015-01-08 15:54:50 +0800
commitcacfc8586957220423210a496e3064d7eafab393 (patch)
treeea9b9f8eeb0b7a2799842401192da94b14d5aa2d /go/operation/lookup.go
parentf2b07d605199282dc392c5c10b02218ada7eac56 (diff)
downloadseaweedfs-cacfc8586957220423210a496e3064d7eafab393.tar.xz
seaweedfs-cacfc8586957220423210a496e3064d7eafab393.zip
add some String() to make codes easier to read and debug
Diffstat (limited to 'go/operation/lookup.go')
-rw-r--r--go/operation/lookup.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/go/operation/lookup.go b/go/operation/lookup.go
index e6b6658da..70bc7146e 100644
--- a/go/operation/lookup.go
+++ b/go/operation/lookup.go
@@ -3,7 +3,7 @@ package operation
import (
"encoding/json"
"errors"
- _ "fmt"
+ "fmt"
"math/rand"
"net/url"
"strings"
@@ -22,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
)