mirror of https://github.com/ledisdb/ledisdb.git
update ledis-cli output
This commit is contained in:
parent
55bce5f553
commit
ba7ba1f137
|
@ -68,12 +68,15 @@ func printReply(reply interface{}) {
|
||||||
fmt.Printf("%s", string(reply))
|
fmt.Printf("%s", string(reply))
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
for i, v := range reply {
|
for i, v := range reply {
|
||||||
fmt.Printf("%d) ", i)
|
fmt.Printf("%d) ", i+1)
|
||||||
if v == nil {
|
if v == nil {
|
||||||
fmt.Printf("(nil)")
|
fmt.Printf("(nil)")
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("%q", v)
|
fmt.Printf("%q", v)
|
||||||
}
|
}
|
||||||
|
if i != len(reply)-1 {
|
||||||
|
fmt.Printf("\n")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
fmt.Printf("invalid ledis reply")
|
fmt.Printf("invalid ledis reply")
|
||||||
|
|
Loading…
Reference in New Issue