From: Dai Jie Date: Fri, 2 Oct 2020 09:09:24 +0000 (+0000) Subject: net/http: remove duplicate declaration of error X-Git-Tag: go1.16beta1~862 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=44a15a7262b14d517fefab5b7c13ca97ab099a30;p=gostls13.git 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 --- 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