go-smtp icon indicating copy to clipboard operation
go-smtp copied to clipboard

server: Move to using Backend.Features() instead of Enable* flags

Open foxcpp opened this issue 5 years ago • 4 comments
trafficstars

Closes #107.

foxcpp avatar Jul 14 '20 11:07 foxcpp

Codecov Report

Merging #112 into master will increase coverage by 0.38%. The diff coverage is 58.33%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update 1918b06...fd566a2. Read the comment docs.

codecov[bot] avatar Jul 14 '20 11:07 codecov[bot]

I would like to see a func (f Feature) Contains(feat int) bool { ... } method to clean up the code.

corny avatar Jul 14 '20 21:07 corny

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?

emersion avatar Jul 23 '20 08:07 emersion

Addressed feedback: added Feature.Contains() and inverted flags (making extensions opt-in rather than opt-out).

foxcpp avatar Jan 17 '21 14:01 foxcpp