diff options
author | mike o'brien <mpobrien005@gmail.com> | 2014-11-17 17:40:39 -0500 |
---|---|---|
committer | mike o'brien <mpobrien005@gmail.com> | 2014-11-21 14:36:51 -0500 |
commit | 086bde0310bf290bd7581ddb29d6d237b31922aa (patch) | |
tree | 5289dedeae5adb6836dda71a7efd7f5ebfe99ca5 | |
parent | 020c13457cde3b70a7c788fd4d1f846985778ae2 (diff) | |
download | mongo-086bde0310bf290bd7581ddb29d6d237b31922aa.tar.gz |
TOOLS-381 use signed integer for bsondump type with debug
Former-commit-id: 6aadb2e21f92b451d7125a0a918e2555a353b273
-rw-r--r-- | bsondump/bsondump.go | 2 |
1 files changed, 1 insertions, 1 deletions
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. |