diff --git a/templates/code_go.dot b/templates/code_go.dot index 0f5a33f..21b7496 100644 --- a/templates/code_go.dot +++ b/templates/code_go.dot @@ -1,21 +1,21 @@ package main import ( - "bytes" - "net/http" + "bytes" + "net/http" ) func main() { {{?data.allHeaders.length}} - headers := map[string][]string{ - {{~data.allHeaders :p:index}}"{{=p.name}}": []string{"{{=p.exampleValues.object}}"},{{?index < data.allHeaders.length-1}} - {{?}}{{~}} - }{{?}} + headers := map[string][]string{ + {{~data.allHeaders :p:index}}"{{=p.name}}": []string{"{{=p.exampleValues.object}}"},{{?index < data.allHeaders.length-1}} + {{?}}{{~}} + }{{?}} - data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("{{=data.methodUpper}}", "{{=data.url}}", data) - req.Header = headers + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("{{=data.methodUpper}}", "{{=data.url}}", data) + req.Header = headers - client := &http.Client{} - resp, err := client.Do(req) + client := &http.Client{} + resp, err := client.Do(req) } \ No newline at end of file