We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 419400b commit 5013fe1Copy full SHA for 5013fe1
1 file changed
sdk/mpr/utils.go
@@ -25,8 +25,11 @@ func BlobToUUID(data []byte) string {
25
}
26
27
// IDToBsonBinary converts a UUID string to a BSON binary value.
28
+// For invalid or empty UUIDs (e.g. test placeholders), falls back to generating
29
+// a random ID to maintain backward compatibility with existing serialization paths.
30
+// For strict validation, use bsonutil.IDToBsonBinaryErr.
31
func IDToBsonBinary(id string) primitive.Binary {
- return bsonutil.IDToBsonBinary(id)
32
+ return idToBsonBinary(id)
33
34
35
// BsonBinaryToID converts a BSON binary value to a UUID string.
0 commit comments