Generic redialer for connection-like types in Go