GODRIVER-2765Backlog
Add an "omitzero" BSON struct tag
To support the use case of encoding Go structs as MongoDB documents, we will add an {{omitnil}} BSON struct tag that only omits {{nil}} values but includes empty values. The {{$push}} and {{$addToSet}} update operators work the same when modifying document fields that are empty arrays and document fields that do not exist (the only problem is document fields that are BSON null), so the behavior of {{omitnil}} maps well to that use case. Additionally, other MongoDB drivers (e.g. Java and Rust) of