Skip to content

Conversation

@yockii
Copy link

@yockii yockii commented Sep 18, 2025

  1. to support new tag omitzero for go 1.24+
  2. fix some tags in json like json:"id,omitempty,string"
  3. fix null filed in json string, when the field is not required, and it is "null" value, the validation may failed.
  4. add test for these situations.

eg:

type User struct { ID uint64 `json:"id,omitempty,string"` Name string `json:"name"` Age int `json:"age,omitzero"` Addr Address `json:"address,omitempty"` } type Address struct { Zip string `json:"zip"` } 

and with json:

{ "name": "Yockii", "address": null } 
and fix not required filed object validation test: add new tests for omitzero tag handling and nil field validation
@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (8e5611c) to head (ba2ee13).

Additional details and impacted files
@@ Coverage Diff @@ ## master #1076 +/- ## ======================================= Coverage 99.59% 99.59% ======================================= Files 34 34 Lines 2206 2216 +10 ======================================= + Hits 2197 2207 +10  Misses 6 6 Partials 3 3 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant