[BREAKING CHANGE] v0.3.3: MiddlewareType and WriteToSkipMiddleware #71
Closed
wneessen
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release will break current Middleware implementations
For middlewares to be able to access the fully written mail message, we need a way to execute
WriteTo
without the calling middleware to be handled, otherwise we end up in an infinite loop.This release introduces the
MiddlewareType
and the corresponding change of theMiddleware
interface. We now require to return theMiddlewareType
when theType()
method on the interface is called. ConvenientlyMiddlewareType
is an alias to astring
.This way we can also introduce the
WriteToSkipMiddleware()
method which takes aMiddlewareType
as argument. This will allow us to use aWriteTo
call with the initiatingMiddleware
itself to be skipped.Please note: This release will break any existing go-mail
Middleware
, since they don't provide aType()
method yet.What's Changed
Full Changelog: v0.3.2...v0.3.3
This discussion was created from the release [BREAKING CHANGE] v0.3.3: MiddlewareType and WriteToSkipMiddleware.
Beta Was this translation helpful? Give feedback.
All reactions