about summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-09-10 07:33:28 +0200
committerReto Brunner <reto@labrat.space>2020-09-10 07:35:56 +0200
commit504417b6709ba8ec74016ad00eaa7fcec9deb6ef (patch)
treec9099b2e62c01a9532fdfd882f079881bf89cc61 /lib
parentfe42beb3e4ac00f07884880b7a6251c59fd04230 (diff)
downloadaerc-504417b6709ba8ec74016ad00eaa7fcec9deb6ef.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/format/format.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/format/format.go b/lib/format/format.go
index 0eda7ae..66dced1 100644
--- a/lib/format/format.go
+++ b/lib/format/format.go
@@ -22,9 +22,7 @@ func ParseAddress(address string) (*models.Address, error) {
 
 func ParseAddressList(s string) ([]*models.Address, error) {
 	if len(s) == 0 {
-		// workaround for go versions < 1.15
-		// 1.15 returns an empty list if "" is provided as input, prior versions
-		// return an error which is not what we want
+		// we don't consider an empty list to be an error
 		return nil, nil
 	}
 	parser := gomail.AddressParser{