Documentation
¶
Overview ¶
Package rcptto includes utility functions for handling lists of recipients
Index ¶
- func Add(rcptTos []*addr.RcptTo, rcptTo string, esmtpArgs string) (out []*addr.RcptTo)
- func Copy(rcptTos []*addr.RcptTo) (out []*addr.RcptTo)
- func Del(rcptTos []*addr.RcptTo, rcptTo string) (out []*addr.RcptTo)
- func Diff(orig []*addr.RcptTo, changed []*addr.RcptTo) (deletions []*addr.RcptTo, additions []*addr.RcptTo)
- func Has(rcptTos []*addr.RcptTo, rcptTo string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add adds rcptTo with esmtpArgs to the slice rcptTos and returns the new slice. If rcptTo is already in rcptTos, it is not added a second time. In this case the exiting ESMTP argument gets updated.
func Del ¶
Del removes rcptTo from the slice rcptTos and returns the new slice. When rcptTo is not part of rcptTos, the slice does not get altered.
func Diff ¶
func Diff(orig []*addr.RcptTo, changed []*addr.RcptTo) (deletions []*addr.RcptTo, additions []*addr.RcptTo)
Diff calculates the difference between orig and changed. The order of orig and change does not matter. A change in the ESMTP argument results in the deletion of the original RcptTo and addition of then RcptTo with the new ESMTP argument.
Types ¶
This section is empty.