clientv3: clean up unused code.

release-3.4
johncming 2019-03-18 10:34:41 +08:00
parent e1ca3b4434
commit 662fd55084
1 changed files with 0 additions and 9 deletions

View File

@ -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
}