cache: remove negative slice size check from NewDialer

Signed-off-by: Miguel Ángel Jimeno <miguelangel4b@gmail.com>
This commit is contained in:
Miguel Ángel Jimeno 2020-08-25 20:28:58 +02:00
parent a21f098b5b
commit 394c1e8527

View File

@ -39,7 +39,7 @@ func NewDialer(options Options) (DialerFunc, error) {
finalIps = append(finalIps, ip)
}
}
if err != nil || len(finalIps) <= 0 {
if err != nil || len(finalIps) < 0 {
return nil, &NoAddressFoundError{}
} // Dial to the IPs finally.
for _, ip := range ips {