goccy / go-yaml

YAML support for the Go language
MIT License
1.12k stars 129 forks source link

Preserve defaults for zero initialised structs as well #442

Closed yhabteab closed 1 month ago

yhabteab commented 5 months ago

Before submitting your PR, please confirm the following.

---
first: "Test"
nested: # The decoder will always zero-initialise this nested struct and override the defaults
  # Just some comment here
#  val: "default"

fixes #441

codecov-commenter commented 5 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.78%. Comparing base (237df0e) to head (092b488).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #442 +/- ## ========================================== + Coverage 78.77% 78.78% +0.01% ========================================== Files 13 13 Lines 4004 4007 +3 ========================================== + Hits 3154 3157 +3 Misses 591 591 Partials 259 259 ```