Browse Source

etcdctl: fix strings.HasPrefix args order

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
Iskander Sharipov 7 years ago
parent
commit
1d80d5f497
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdctl/ctlv2/command/util.go

+ 1 - 1
etcdctl/ctlv2/command/util.go

@@ -103,7 +103,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
 		}