Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-176

Choose and implement a single integer type

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: