Merge pull request #561 from zhujun2006/master

task#560 print leaf k/v with right value
pull/24/head
Ben Johnson 2016-09-06 14:09:29 -06:00 committed by GitHub
commit e72f08ddb5
1 changed files with 2 additions and 2 deletions

View File

@ -542,9 +542,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)