Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omitempty also considers structs with all zero values "empty". #356

Merged
merged 1 commit into from
Jun 7, 2022

Commits on Jun 7, 2022

  1. omitempty also considers structs with all zero values "empty".

    A common use case for this is time.Time, which will get marshaled
    otherwise.
    
    A struct with private fields set is *not* considered to be "empty"; this
    is because some structs (such as time.Time) contain only private fields.
    
    Fixes #353
    arp242 committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    bd45a18 View commit details
    Browse the repository at this point in the history