aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstone1342006 <stone1342006@stone13006dembp.mshome.net>2016-05-18 22:56:05 +0800
committerstone1342006 <stone1342006@stone13006dembp.mshome.net>2016-05-18 22:56:05 +0800
commit60fbb2c9fa51d07e7e0e7d874de45d6b800e895d (patch)
tree2fb09e488ccc0b133ab03aec4f386f977adbc96d
parentMerge pull request #556 from xyproto/master (diff)
downloaddedo-60fbb2c9fa51d07e7e0e7d874de45d6b800e895d.tar.gz
dedo-60fbb2c9fa51d07e7e0e7d874de45d6b800e895d.tar.xz
task#560 print leaf k/v with right value
-rw-r--r--cmd/bolt/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index b96e6f7..9d599f1 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -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)