gorilla / schema

Package gorilla/schema fills a struct with form values.
https://gorilla.github.io
BSD 3-Clause "New" or "Revised" License
1.39k stars 231 forks source link

[FEATURE] Support for omitzero similar to encoding/json from golang 1.24 #224

Open david-its opened 1 month ago

david-its commented 1 month ago

Is there an existing feature request for this?

Is your feature request related to a problem? Please describe.

It would be great to support omitzero tag working the same way as coming golang 1.24 encoding/json package support.

Describe the solution that you would like.

omitzero tag should trigger calling IsZero() method on value and verify value specific "zero" values. e.g. it helps with time.Time zero values support.

Describe alternatives you have considered.

No response

Anything else?

No response