]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: remove duplicate declaration of error
authorDai Jie <gzdaijie@163.com>
Fri, 2 Oct 2020 09:09:24 +0000 (09:09 +0000)
committerRob Pike <r@golang.org>
Fri, 2 Oct 2020 12:40:58 +0000 (12:40 +0000)
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 <r@golang.org>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>

src/net/rpc/client.go

index 25f2a004e449526eb93ed920dd92dedf5bccb094..60bb2cc99f99bf8d983b013f32a245d9264e7a60 100644 (file)
@@ -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