Closed wneessen closed 1 year ago
Merging #83 (17b9d2c) into main (1ff87db) will decrease coverage by
0.62%
. The diff coverage is93.02%
.
@@ Coverage Diff @@
## main #83 +/- ##
==========================================
- Coverage 83.85% 83.22% -0.63%
==========================================
Files 13 13
Lines 1381 1425 +44
==========================================
+ Hits 1158 1186 +28
- Misses 153 165 +12
- Partials 70 74 +4
Impacted Files | Coverage Δ | |
---|---|---|
msg.go | 86.49% <93.02%> (-0.04%) |
:arrow_down: |
msgwriter.go | 86.08% <0.00%> (-4.57%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR introduces two major changes:
SetHeader
andSetHeaderPreformatted
have been deprecated in favour ofSetGenHeader
andSetGenHeaderPreformatted
As pointed out in #80 the naming was pretty confusing, given that we already haveSetAddrHeader
. With the new naming convention it should be more clear. For compatibility reasons the old methods have been kept for now but in reality they are just aliases to the new methodsGetAddrHeader
andGetAddrHeaderString
have been introduced As requested in #80 analogous toGetGenHeader
we also need a similar method for the address headers. Since address headers are*mail.Address
pointer, we've also added a*String
method that will extract the address string and return a string slice instead Additionally we're introducing methods for the actual address headers:GetTo
,GetFrom
,GetCc
andGetBcc
(with a*String
counterpart as well). This way the user has full flexibility. Either they use the more "low-level"GetAddrHeader
method or the higher level methods for the corresponding address type