Skip to content

Commit 956efeb

Browse files
committed
update wording
1 parent 7c96dee commit 956efeb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bson/decoder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ func TestDecoderConfiguration(t *testing.T) {
647647

648648
var got objectIDTest
649649
err := dec.Decode(&got)
650-
const want = "error decoding key id: decoding an object ID into a plain string is not supported (set Decoder.ObjectIDAsHexString to enable decoding as a hexadecimal representation)"
650+
const want = "error decoding key id: decoding an object ID into a string is not supported by default (set Decoder.ObjectIDAsHexString to enable decoding as a hexadecimal string)"
651651
assert.EqualError(t, err, want)
652652
})
653653
t.Run("DefaultDocumentM top-level", func(t *testing.T) {

bson/string_codec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ func (sc *stringCodec) decodeType(dc DecodeContext, vr ValueReader, t reflect.Ty
5858
}
5959
str = oid.Hex()
6060
} else {
61-
msg := "decoding an object ID into a plain string is not supported " +
62-
"(set Decoder.ObjectIDAsHexString to enable decoding as a hexadecimal representation)"
61+
const msg = "decoding an object ID into a string is not supported by default " +
62+
"(set Decoder.ObjectIDAsHexString to enable decoding as a hexadecimal string)"
6363
return emptyValue, errors.New(msg)
6464
}
6565
case TypeSymbol:

0 commit comments

Comments
 (0)