From 086bde0310bf290bd7581ddb29d6d237b31922aa Mon Sep 17 00:00:00 2001 From: mike o'brien Date: Mon, 17 Nov 2014 17:40:39 -0500 Subject: TOOLS-381 use signed integer for bsondump type with debug Former-commit-id: 6aadb2e21f92b451d7125a0a918e2555a353b273 --- bsondump/bsondump.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsondump/bsondump.go b/bsondump/bsondump.go index fc29c985305..9eb08ccb7af 100644 --- a/bsondump/bsondump.go +++ b/bsondump/bsondump.go @@ -121,7 +121,7 @@ func DebugBSON(raw bson.Raw, indentLevel int, out io.Writer) error { // 3. The BSON value // So size == 1 [size of type byte] + 1 [null byte for cstring key] + len(bson key) + len(bson value) // see http://bsonspec.org/spec.html for more details - fmt.Fprintf(out, "%v\t\t\ttype: %4v size: %v\n", indent, rawElem.Value.Kind, + fmt.Fprintf(out, "%v\t\t\ttype: %4v size: %v\n", indent, int8(rawElem.Value.Kind), 2+len(rawElem.Name)+len(rawElem.Value.Data)) //For nested objects or arrays, recurse. -- cgit v1.2.1