|
http: remove finalURL from Client.Get; move to Response
This CL:
-- removes Response.RequestMethod string
-- adds Response.Request *Request
-- removes the finalURL result parameter from client.Get()
-- adds a gofix rule for callers of http.Get which assign
the final url to the blank identifier; warning otherwise
Caller who did:
res, finalURL, err := http.Get(...)
now need to do:
res, err := http.Get(...)
if err != nil {
...
}
finalURL := res.Request.URL.String()
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+202 lines, -99 lines) |
Patch |
 |
M |
doc/codelab/wiki/get.go
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
misc/dashboard/builder/http.go
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/cmd/godoc/main.go
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/cmd/gofix/Makefile
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
src/cmd/gofix/httpfinalurl.go
|
View
|
1
2
3
4
|
1 chunk |
+56 lines, -0 lines |
0 comments
|
Download
|
 |
A |
src/cmd/gofix/httpfinalurl_test.go
|
View
|
1
2
3
4
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/client.go
|
View
|
1
|
3 chunks |
+2 lines, -9 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/client_test.go
|
View
|
1
|
4 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/fs_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/pkg/http/persist.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/request_test.go
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/pkg/http/response.go
|
View
|
1
2
3
4
|
3 chunks |
+17 lines, -12 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/response_test.go
|
View
|
1
|
13 chunks |
+31 lines, -27 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/responsewrite_test.go
|
View
|
1
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/reverseproxy_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/pkg/http/serve_test.go
|
View
|
1
|
11 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/transfer.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/transport.go
|
View
|
1
|
2 chunks |
+11 lines, -7 lines |
0 comments
|
Download
|
 |
M |
src/pkg/http/transport_test.go
|
View
|
1
|
7 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
src/pkg/rpc/client.go
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/pkg/websocket/client.go
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
src/pkg/websocket/websocket_test.go
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 7
|