[GODRIVER-1423] Nil interface panics in BSON marshalling Created: 03/Dec/19 Updated: 28/Oct/23 Resolved: 04/Dec/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Divjot Arora (Inactive) | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
Repro attached. We can probably check if the value is nil and the reflect.Kind is an interface. In this case, either marshal to BSON null or leave out the field if omitempty is given in a struct. |
| Comments |
| Comment by Githook User [ 04/Dec/19 ] |
|
Author: {'email': 'isabella.siu@10gen.com', 'name': 'iwysiu', 'username': 'iwysiu'}Message: |