-
Notifications
You must be signed in to change notification settings - Fork 5
/
httpmethod.tmpl
37 lines (30 loc) · 842 Bytes
/
httpmethod.tmpl
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
// Code generated by usestdlibvars, DO NOT EDIT.
package http
import "net/http"
var (
{{- range $key, $data := .Data }}
_ = "{{ $data.Key }}"
{{- end }}
)
const (
{{- range $key, $data := .Data }}
_ = "{{ $data.Key }}"
{{- end }}
)
func _() {
{{- range $key, $data := .Data }}
_, _ = http.NewRequest("{{ $data.Key }}", "", nil) // want `"{{ quoteMeta $data.Key }}" can be replaced by {{ quoteMeta $data.Value }}`
{{- end }}
}
func _() {
{{- range $key, $data := .Data }}
_, _ = http.NewRequestWithContext(nil, "{{ $data.Key }}", "", nil) // want `"{{ quoteMeta $data.Key }}" can be replaced by {{ quoteMeta $data.Value }}`
{{- end }}
}
func _() {
{{- range $key, $data := .Data }}
_ = &http.Request{
Method: "{{ $data.Key }}", // want `"{{ quoteMeta $data.Key }}" can be replaced by {{ quoteMeta $data.Value }}`
}
{{- end }}
}