update ledis-cli output

This commit is contained in:
siddontang 2014-06-22 10:21:53 +08:00
parent 55bce5f553
commit ba7ba1f137
1 changed files with 4 additions and 1 deletions

View File

@ -68,12 +68,15 @@ func printReply(reply interface{}) {
fmt.Printf("%s", string(reply))
case []interface{}:
for i, v := range reply {
fmt.Printf("%d) ", i)
fmt.Printf("%d) ", i+1)
if v == nil {
fmt.Printf("(nil)")
} else {
fmt.Printf("%q", v)
}
if i != len(reply)-1 {
fmt.Printf("\n")
}
}
default:
fmt.Printf("invalid ledis reply")