Skip to content

fix: support defaultifempty on struct and array types#336

Open
chrisseto wants to merge 1 commit into
doug-martin:masterfrom
chrisseto:fix-defaultifempty
Open

fix: support defaultifempty on struct and array types#336
chrisseto wants to merge 1 commit into
doug-martin:masterfrom
chrisseto:fix-defaultifempty

Conversation

@chrisseto

Copy link
Copy Markdown
Prior to this commit, defaultifempty would not appropriately detect
the "emptiness" of struct types nor non-zero length array types.
This was notable for nullable types when used as values, such as
sql.NullString, and gofrs/uuid, which is defined as [16]byte,
respectively.

    Prior to this commit, defaultifempty would not appropriately detect
    the "emptiness" of struct types nor non-zero length array types.
    This was notable for nullable types when used as values, such as
    sql.NullString, and gofrs/uuid, which is defined as [16]byte,
    respectively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant