From 44a15a7262b14d517fefab5b7c13ca97ab099a30 Mon Sep 17 00:00:00 2001 From: Dai Jie Date: Fri, 2 Oct 2020 09:09:24 +0000 Subject: [PATCH] net/http: remove duplicate declaration of error there is no need to declare a error variable here. Change-Id: I9ea5bcf568d800efed19c90caf751aaf9abe5555 GitHub-Last-Rev: 538d1f9cee0b8564a8bec262529f567da847f1b0 GitHub-Pull-Request: golang/go#41751 Reviewed-on: https://go-review.googlesource.com/c/go/+/259037 Reviewed-by: Rob Pike Trust: Alberto Donizetti --- src/net/rpc/client.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/net/rpc/client.go b/src/net/rpc/client.go index 25f2a004e4..60bb2cc99f 100644 --- a/src/net/rpc/client.go +++ b/src/net/rpc/client.go @@ -245,7 +245,6 @@ func DialHTTP(network, address string) (*Client, error) { // DialHTTPPath connects to an HTTP RPC server // at the specified network address and path. func DialHTTPPath(network, address, path string) (*Client, error) { - var err error conn, err := net.Dial(network, address) if err != nil { return nil, err -- 2.50.0