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

Add fig.StringUnmarshaler support for SMTPAuthType #341

Merged
merged 3 commits into from
Oct 21, 2024
Merged

Conversation

wneessen
Copy link
Owner

Implement the fig.StringUnmarshaler interface for SMTPAuthType to map strings to corresponding authentication types. Added comprehensive unit tests to ensure correct functionality for all supported auth type strings.

This allows users of fig to reference the mail.SMTPAuthType directly in their fig config.

Implement the fig.StringUnmarshaler interface for SMTPAuthType to map strings to corresponding authentication types. Added comprehensive unit tests to ensure correct functionality for all supported auth type strings.
Included the SPDX license identifiers for copyright and license type at the beginning of the auth_test.go file. This ensures clear licensing information is provided and helps with automated license compliance.
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.46%. Comparing base (a638090) to head (09133ef).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
- Coverage   86.73%   84.46%   -2.27%     
==========================================
  Files          26       27       +1     
  Lines        2382     2904     +522     
==========================================
+ Hits         2066     2453     +387     
- Misses        181      320     +139     
+ Partials      135      131       -4     

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

Introduce a new test case to verify that `UnmarshalString` fails when given an invalid string. This ensures the robustness of the error handling in the `SMTPAuthType` unmarshalling process.
@wneessen wneessen merged commit 957cd8e into main Oct 21, 2024
30 of 32 checks passed
@wneessen wneessen deleted the fig-support branch October 21, 2024 20:51
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.

1 participant