浏览代码

clientv3: optimize func NewFromURL

jiaxuanzhou 8 年之前
父节点
当前提交
e1bf612ee8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      clientv3/client.go

+ 2 - 2
clientv3/client.go

@@ -90,8 +90,8 @@ func NewCtxClient(ctx context.Context) *Client {
 }
 
 // NewFromURL creates a new etcdv3 client from a URL.
-func NewFromURL(url string) (*Client, error) {
-	return New(Config{Endpoints: []string{url}})
+func NewFromURL(urls []string) (*Client, error) {
+	return New(Config{Endpoints: urls})
 }
 
 // Close shuts down the client's etcd connections.