Skip to content

document that encoding/json omitzero/IsZero is not about assert.IsZero/reflect.Zero #1759

@ccoVeille

Description

@ccoVeille

Description

The addition of omitzero to encoding/json creates confusion

Proposed solution

  • Add information about this to the documentation of assert.Zero, or somewhere else more appropriate
  • add a unit test with a simple struct that will implement IsZero() bool and return true to validate no changes is done in that direction

Use case

Prevent confusion and PR that might pop out

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions