Browse Source

etcdmain: remove shadowed error variable

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
f091641e46
1 changed files with 2 additions and 2 deletions
  1. 2 2
      etcdmain/gateway.go

+ 2 - 2
etcdmain/gateway.go

@@ -106,8 +106,8 @@ func startGateway(cmd *cobra.Command, args []string) {
 	srvs.Endpoints = stripSchema(srvs.Endpoints)
 	if len(srvs.SRVs) == 0 {
 		for _, ep := range srvs.Endpoints {
-			h, p, err := net.SplitHostPort(ep)
-			if err != nil {
+			h, p, serr := net.SplitHostPort(ep)
+			if serr != nil {
 				fmt.Printf("error parsing endpoint %q", ep)
 				os.Exit(1)
 			}