mirror of https://github.com/etcd-io/bbolt.git
task#560 print leaf k/v with right value
parent
c1c3bd7e84
commit
60fbb2c9fa
|
@ -539,9 +539,9 @@ func (cmd *PageCommand) PrintLeaf(w io.Writer, buf []byte) error {
|
|||
b := (*bucket)(unsafe.Pointer(&e.value()[0]))
|
||||
v = fmt.Sprintf("<pgid=%d,seq=%d>", b.root, b.sequence)
|
||||
} else if isPrintable(string(e.value())) {
|
||||
k = fmt.Sprintf("%q", string(e.value()))
|
||||
v = fmt.Sprintf("%q", string(e.value()))
|
||||
} else {
|
||||
k = fmt.Sprintf("%x", string(e.value()))
|
||||
v = fmt.Sprintf("%x", string(e.value()))
|
||||
}
|
||||
|
||||
fmt.Fprintf(w, "%s: %s\n", k, v)
|
||||
|
|
Loading…
Reference in New Issue