-
Notifications
You must be signed in to change notification settings - Fork 5
/
method.go
83 lines (76 loc) · 3.24 KB
/
method.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`
}
}