-
Notifications
You must be signed in to change notification settings - Fork 5
/
issue32.go
executable file
·83 lines (76 loc) · 3.24 KB
/
issue32.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Code generated by usestdlibvars, DO NOT EDIT.
package http_test
import "net/http"
var (
_ = "connect"
_ = "delete"
_ = "get"
_ = "head"
_ = "options"
_ = "patch"
_ = "post"
_ = "put"
_ = "trace"
)
const (
_ = "connect"
_ = "delete"
_ = "get"
_ = "head"
_ = "options"
_ = "patch"
_ = "post"
_ = "put"
_ = "trace"
)
func _() {
_, _ = http.NewRequest("connect", "", http.NoBody) // want `"CONNECT" can be replaced by http\.MethodConnect`
_, _ = http.NewRequest("delete", "", http.NoBody) // want `"DELETE" can be replaced by http\.MethodDelete`
_, _ = http.NewRequest("get", "", http.NoBody) // want `"GET" can be replaced by http\.MethodGet`
_, _ = http.NewRequest("head", "", http.NoBody) // want `"HEAD" can be replaced by http\.MethodHead`
_, _ = http.NewRequest("options", "", http.NoBody) // want `"OPTIONS" can be replaced by http\.MethodOptions`
_, _ = http.NewRequest("patch", "", http.NoBody) // want `"PATCH" can be replaced by http\.MethodPatch`
_, _ = http.NewRequest("post", "", http.NoBody) // want `"POST" can be replaced by http\.MethodPost`
_, _ = http.NewRequest("put", "", http.NoBody) // want `"PUT" can be replaced by http\.MethodPut`
_, _ = http.NewRequest("trace", "", http.NoBody) // want `"TRACE" can be replaced by http\.MethodTrace`
}
func _() {
_, _ = http.NewRequestWithContext(nil, "connect", "", http.NoBody) // want `"CONNECT" can be replaced by http\.MethodConnect`
_, _ = http.NewRequestWithContext(nil, "delete", "", http.NoBody) // want `"DELETE" can be replaced by http\.MethodDelete`
_, _ = http.NewRequestWithContext(nil, "get", "", http.NoBody) // want `"GET" can be replaced by http\.MethodGet`
_, _ = http.NewRequestWithContext(nil, "head", "", http.NoBody) // want `"HEAD" can be replaced by http\.MethodHead`
_, _ = http.NewRequestWithContext(nil, "options", "", http.NoBody) // want `"OPTIONS" can be replaced by http\.MethodOptions`
_, _ = http.NewRequestWithContext(nil, "patch", "", http.NoBody) // want `"PATCH" can be replaced by http\.MethodPatch`
_, _ = http.NewRequestWithContext(nil, "post", "", http.NoBody) // want `"POST" can be replaced by http\.MethodPost`
_, _ = http.NewRequestWithContext(nil, "put", "", http.NoBody) // want `"PUT" can be replaced by http\.MethodPut`
_, _ = http.NewRequestWithContext(nil, "trace", "", http.NoBody) // want `"TRACE" can be replaced by http\.MethodTrace`
}
func _() {
_ = &http.Request{
Method: "connect", // want `"CONNECT" can be replaced by http\.MethodConnect`
}
_ = &http.Request{
Method: "delete", // want `"DELETE" can be replaced by http\.MethodDelete`
}
_ = &http.Request{
Method: "get", // want `"GET" can be replaced by http\.MethodGet`
}
_ = &http.Request{
Method: "head", // want `"HEAD" can be replaced by http\.MethodHead`
}
_ = &http.Request{
Method: "options", // want `"OPTIONS" can be replaced by http\.MethodOptions`
}
_ = &http.Request{
Method: "patch", // want `"PATCH" can be replaced by http\.MethodPatch`
}
_ = &http.Request{
Method: "post", // want `"POST" can be replaced by http\.MethodPost`
}
_ = &http.Request{
Method: "put", // want `"PUT" can be replaced by http\.MethodPut`
}
_ = &http.Request{
Method: "trace", // want `"TRACE" can be replaced by http\.MethodTrace`
}
}