[GODRIVER-190] Add a Reader constructor for elements Created: 11/Jan/18 Updated: 30/Jan/18 Resolved: 30/Jan/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.0.1 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | GODRIVER Core Specs |
| Description |
|
Add a constructor to the bson.Constructor and bson.ArrayConstructor types that takes a bson.Reader and creates an *Element or a *Value from it. Because the bson.Reader type is directly implemented on top of []byte, users can directly pass a []byte into the method without having to cast it first. |