Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Feb 24, 2023
1 parent 752806a commit d8741ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/utils/etcdutil/etcdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ func CreateClients(tlsConfig *tls.Config, acUrls []url.URL) (*clientv3.Client, *
}

func createEtcdClient(tlsConfig *tls.Config, acUrls []url.URL) (*clientv3.Client, error) {
if len(acUrls) == 0 {
return nil, errs.ErrNewEtcdClient.FastGenByArgs("no available etcd address")
}
endpoints := make([]string, 0, len(acUrls))
for _, u := range acUrls {
endpoints = append(endpoints, u.String())
Expand Down

0 comments on commit d8741ad

Please sign in to comment.