mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-07-12 07:10:12 +00:00
task#560 print leaf k/v with right value
This commit is contained in:
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…
x
Reference in New Issue
Block a user