Mercurial > projects > managesieve
diff managesieve.go @ 8:75a4ee940f36
Fix SRV record lookup
Fill the preallocated array of host/port strings instead of incorrectly
appending to a preallocated array already filled with empty strings.
author | Guido Berhoerster <guido+managesieve@berhoerster.name> |
---|---|
date | Wed, 03 Feb 2021 13:02:39 +0100 |
parents | f9bb517e9447 |
children | b790df0733d4 |
line wrap: on
line diff
--- a/managesieve.go Wed Dec 23 18:41:35 2020 +0100 +++ b/managesieve.go Wed Feb 03 13:02:39 2021 +0100 @@ -108,7 +108,7 @@ } return nil, err } - services := make([]string, len(addrs)) + services := make([]string, 0, len(addrs)) // addrs is already ordered by priority for _, addr := range addrs { services = append(services,