fix comment in ParseAddressList
Go pre 1.15 parsed an empty string as an error, 1.15 did not but this was unintentional as per https://github.com/golang/go/issues/40803 Fix the comment accordingly
This commit is contained in:
parent
fe42beb3e4
commit
504417b670
1 changed files with 1 additions and 3 deletions
|
@ -22,9 +22,7 @@ func ParseAddress(address string) (*models.Address, error) {
|
||||||
|
|
||||||
func ParseAddressList(s string) ([]*models.Address, error) {
|
func ParseAddressList(s string) ([]*models.Address, error) {
|
||||||
if len(s) == 0 {
|
if len(s) == 0 {
|
||||||
// workaround for go versions < 1.15
|
// we don't consider an empty list to be an error
|
||||||
// 1.15 returns an empty list if "" is provided as input, prior versions
|
|
||||||
// return an error which is not what we want
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
parser := gomail.AddressParser{
|
parser := gomail.AddressParser{
|
||||||
|
|
Loading…
Reference in a new issue