diff options
Diffstat (limited to 'src/cmd/fix/go1rename_test.go')
-rw-r--r-- | src/cmd/fix/go1rename_test.go | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/src/cmd/fix/go1rename_test.go b/src/cmd/fix/go1rename_test.go index 481ebea8e..90219ba71 100644 --- a/src/cmd/fix/go1rename_test.go +++ b/src/cmd/fix/go1rename_test.go @@ -17,6 +17,7 @@ import ( "crypto/aes" "crypto/des" "encoding/json" + "net/http" "net/url" "os" "runtime" @@ -34,6 +35,15 @@ var ( _ = os.Exec _ = runtime.Cgocalls _ = runtime.Goroutines + _ = http.ErrPersistEOF + _ = http.ErrPipeline + _ = http.ErrClosed + _ = http.NewSingleHostReverseProxy + _ = http.NewChunkedReader + _ = http.NewChunkedWriter + _ *http.ReverseProxy + _ *http.ClientConn + _ *http.ServerConn ) `, Out: `package main @@ -42,6 +52,7 @@ import ( "crypto/aes" "crypto/cipher" "encoding/json" + "net/http/httputil" "net/url" "runtime" "syscall" @@ -59,7 +70,126 @@ var ( _ = syscall.Exec _ = runtime.NumCgoCall _ = runtime.NumGoroutine + _ = httputil.ErrPersistEOF + _ = httputil.ErrPipeline + _ = httputil.ErrClosed + _ = httputil.NewSingleHostReverseProxy + _ = httputil.NewChunkedReader + _ = httputil.NewChunkedWriter + _ *httputil.ReverseProxy + _ *httputil.ClientConn + _ *httputil.ServerConn ) `, }, + { + Name: "httputil.0", + In: `package main + +import "net/http" + +func f() { + http.DumpRequest(nil, false) + http.DumpRequestOut(nil, false) + http.DumpResponse(nil, false) + http.NewChunkedReader(nil) + http.NewChunkedWriter(nil) + http.NewClientConn(nil, nil) + http.NewProxyClientConn(nil, nil) + http.NewServerConn(nil, nil) + http.NewSingleHostReverseProxy(nil) +} +`, + Out: `package main + +import "net/http/httputil" + +func f() { + httputil.DumpRequest(nil, false) + httputil.DumpRequestOut(nil, false) + httputil.DumpResponse(nil, false) + httputil.NewChunkedReader(nil) + httputil.NewChunkedWriter(nil) + httputil.NewClientConn(nil, nil) + httputil.NewProxyClientConn(nil, nil) + httputil.NewServerConn(nil, nil) + httputil.NewSingleHostReverseProxy(nil) +} +`, + }, + { + Name: "httputil.1", + In: `package main + +import "net/http" + +func f() { + http.DumpRequest(nil, false) + http.DumpRequestOut(nil, false) + http.DumpResponse(nil, false) + http.NewChunkedReader(nil) + http.NewChunkedWriter(nil) + http.NewClientConn(nil, nil) + http.NewProxyClientConn(nil, nil) + http.NewServerConn(nil, nil) + http.NewSingleHostReverseProxy(nil) +} +`, + Out: `package main + +import "net/http/httputil" + +func f() { + httputil.DumpRequest(nil, false) + httputil.DumpRequestOut(nil, false) + httputil.DumpResponse(nil, false) + httputil.NewChunkedReader(nil) + httputil.NewChunkedWriter(nil) + httputil.NewClientConn(nil, nil) + httputil.NewProxyClientConn(nil, nil) + httputil.NewServerConn(nil, nil) + httputil.NewSingleHostReverseProxy(nil) +} +`, + }, + { + Name: "httputil.2", + In: `package main + +import "net/http" + +func f() { + http.DumpRequest(nil, false) + http.DumpRequestOut(nil, false) + http.DumpResponse(nil, false) + http.NewChunkedReader(nil) + http.NewChunkedWriter(nil) + http.NewClientConn(nil, nil) + http.NewProxyClientConn(nil, nil) + http.NewServerConn(nil, nil) + http.NewSingleHostReverseProxy(nil) + http.Get("") +} +`, + Out: `package main + +import ( + "net/http" + "net/http/httputil" +) + +func f() { + httputil.DumpRequest(nil, false) + httputil.DumpRequestOut(nil, false) + httputil.DumpResponse(nil, false) + httputil.NewChunkedReader(nil) + httputil.NewChunkedWriter(nil) + httputil.NewClientConn(nil, nil) + httputil.NewProxyClientConn(nil, nil) + httputil.NewServerConn(nil, nil) + httputil.NewSingleHostReverseProxy(nil) + http.Get("") +} +`, + }, } |