API: Simplify early return from MailingList helper

This commit is contained in:
Drew DeVault 2021-07-23 18:42:06 +02:00
parent 43c28761d2
commit 4ce0087eb7
1 changed files with 2 additions and 2 deletions

View File

@ -49,14 +49,14 @@ type MailingList struct {
func (list *MailingList) PermitMime() []string {
if len(list.RawPermitMime) == 0 {
return []string{}
return nil
}
return strings.Split(list.RawPermitMime, ",")
}
func (list *MailingList) RejectMime() []string {
if len(list.RawRejectMime) == 0 {
return []string{}
return nil
}
return strings.Split(list.RawRejectMime, ",")
}