[GODRIVER-359] Add bson.Zeroer types for comparing structs Created: 11/Apr/18  Updated: 28/Oct/23  Resolved: 02/May/18

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

Type: Improvement Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Sam Kleinman (Inactive)
Resolution: Fixed Votes: 0
Labels: FreeMonitoring, evg
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
causes GODRIVER-305 reflection panics when doing equality... Closed

 Description   

Currently we attempt to determine if a struct is the zero type in the BSON library by using == which does not work for many types of structs. Instead, create a bson.Zeroer interface with a single method IsZero() bool and use that when determining if a struct is zero. If the struct does not implement this type, then the struct is not zero.


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