Closed tomachalek closed 6 months ago
A note to the EmailNotification
:
To keep custom methods (e.g. DefaultSignature()) without moving them to the cnc-gokit too, please use a wrapping struct:
type EmailNotification struct {
Wrapped mail.NotificationConf
}
func (enConf EmailNotification) DefaultSignature(lang string) string {
if lang == "cs" || lang == "cs-CZ" {
return "Váš CNC-MASM"
}
return "Your CNC-MASM"
}
// etc.
Once an instance of mail.NotificationConf
is needed, you can just use myInst.Wrapped
.
Already fixed
General rules:
Namely:
fsops/fsops.go
api/api.go
general/collections/misc.go
general/collections/multidict.go
general/collections/set.go
mail/mail.go
(here replace EmailNotification with mail.NotificationConf, or define EmailNotification by wrapping mail.NotificationConf)