mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: optimize func NewFromURL
This commit is contained in:
parent
2e1e619cc0
commit
e1bf612ee8
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user