etcdctl: fix strings.HasPrefix args order

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
release-3.4
Iskander Sharipov 2019-02-02 02:39:27 +03:00
parent 3e0f0ba40e
commit 48a2442fd7
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ func getDomainDiscoveryFlagValue(c *cli.Context) ([]string, error) {
// strip insecure connections
ret := []string{}
for _, ep := range eps {
if strings.HasPrefix("http://", ep) {
if strings.HasPrefix(ep, "http://") {
fmt.Fprintf(os.Stderr, "ignoring discovered insecure endpoint %q\n", ep)
continue
}

View File

@ -444,7 +444,7 @@ func endpointsFromFlagValue(cmd *cobra.Command) ([]string, error) {
// strip insecure connections
ret := []string{}
for _, ep := range eps {
if strings.HasPrefix("http://", ep) {
if strings.HasPrefix(ep, "http://") {
fmt.Fprintf(os.Stderr, "ignoring discovered insecure endpoint %q\n", ep)
continue
}