add some String() to make codes easier to read and debug

This commit is contained in:
yanyiwu
2015-01-08 15:54:50 +08:00
parent f2b07d6051
commit cacfc85869
8 changed files with 41 additions and 2 deletions

View File

@@ -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
)