From 60fbb2c9fa51d07e7e0e7d874de45d6b800e895d Mon Sep 17 00:00:00 2001 From: stone1342006 Date: Wed, 18 May 2016 22:56:05 +0800 Subject: [PATCH] task#560 print leaf k/v with right value --- cmd/bolt/main.go | 4 ++-- 1 file 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("", 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)