[GODRIVER-176] Choose and implement a single integer type Created: 14/Dec/17  Updated: 27/Oct/23  Resolved: 24/Jul/20

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kristofer Brandow (Inactive) Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: Stitch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

We currently use int, int64, uint, and uint32 throughout the bson, builder, and elements package, especially for lengths. While we must use int and int64 to satisfy various Go interfaces, we should choose one type and use it internally. Either uint or uint32 makes the most sense since lengths are never negative. In this case we should also cast things to this type, e.g. uint32(len(foo)).

For now, we should use uint, since it will always be at least a uint32.


Generated at Thu Feb 08 08:33:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.