go-smtp
go-smtp copied to clipboard
server: Move to using Backend.Features() instead of Enable* flags
Closes #107.
Codecov Report
Merging #112 into master will increase coverage by
0.38%. The diff coverage is58.33%.
@@ Coverage Diff @@
## master #112 +/- ##
==========================================
+ Coverage 62.09% 62.47% +0.38%
==========================================
Files 8 8
Lines 1108 1114 +6
==========================================
+ Hits 688 696 +8
+ Misses 312 311 -1
+ Partials 108 107 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| conn.go | 59.82% <57.14%> (+0.76%) |
:arrow_up: |
| server.go | 57.27% <60.00%> (+0.12%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 1918b06...fd566a2. Read the comment docs.
I would like to see a func (f Feature) Contains(feat int) bool { ... } method to clean up the code.
I wonder how we should approach backwards compatibility. If we add a new feature, we won't be able to enable it by default without breaking the backend?
Addressed feedback: added Feature.Contains() and inverted flags (making extensions opt-in rather than opt-out).