Merge pull request #10550 from johncming/unused

clientv3: clean up unused code.
This commit is contained in:
Xiang Li 2019-03-19 14:17:41 -07:00 committed by GitHub
commit 6df40e1c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}