From 662fd5508474f595e8c4ba0830df813c7ca87509 Mon Sep 17 00:00:00 2001 From: johncming Date: Mon, 18 Mar 2019 10:34:41 +0800 Subject: [PATCH] clientv3: clean up unused code. --- clientv3/client.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/clientv3/client.go b/clientv3/client.go index 7bc93d88f..445ecfeb1 100644 --- a/clientv3/client.go +++ b/clientv3/client.go @@ -20,7 +20,6 @@ import ( "errors" "fmt" "net" - "net/url" "os" "strconv" "strings" @@ -667,11 +666,3 @@ func IsConnCanceled(err error) bool { // <= gRPC v1.7.x returns 'errors.New("grpc: the client connection is closing")' return strings.Contains(err.Error(), "grpc: the client connection is closing") } - -func getHost(ep string) string { - url, uerr := url.Parse(ep) - if uerr != nil || !strings.Contains(ep, "://") { - return ep - } - return url.Host -}