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

[confighttp] Add omitempty tag to fields #12482

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

evan-bradley
Copy link
Contributor

@evan-bradley evan-bradley commented Feb 25, 2025

Description

Depends on #12481.

Note that I didn't add the tag to any fields where we set a default value. This is because the zero value is significant in these cases and omitting it from the output would cause it to be set to the default instead of the zero value. We could fix this with a custom interface implemented by our config structs, but that will have to be a separate effort, and simply using the omitempty tag is still an improvement for most fields.

Link to tracking issue

Works toward #12191

@evan-bradley evan-bradley requested a review from a team as a code owner February 25, 2025 16:16
@evan-bradley evan-bradley requested a review from atoulme February 25, 2025 16:17
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.16%. Comparing base (216046a) to head (96903c4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12482   +/-   ##
=======================================
  Coverage   92.16%   92.16%           
=======================================
  Files         465      465           
  Lines       25201    25201           
=======================================
  Hits        23226    23226           
  Misses       1576     1576           
  Partials      399      399           

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

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.

2 participants