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

feat: support ignored value "-" for env tag #338

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

sv-kozlov
Copy link
Contributor

Support for ignoring a field when reading struct.
This is similar to using json:"-".
If the env tag of a field has the value "-", the field is always ignored.

Note, in the env tag, the value "-" can be set not only in place of the name, but also in the list of options.
This is done on the assumption of development convenience, so as not to remove the entire contents of the env tag.

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1cb1967) to head (e213ff6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #338   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          524       529    +5     
=========================================
+ Hits           524       529    +5     

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

@caarlos0 caarlos0 merged commit 4ab8b37 into caarlos0:main Oct 11, 2024
16 checks passed
@caarlos0
Copy link
Owner

thanks!

@sv-kozlov sv-kozlov deleted the ignored_support branch October 12, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants