fill out the easy parts of the codegen

This commit is contained in:
Ben Kraft
2019-12-23 21:07:07 -05:00
parent efa9ccd122
commit 7a20e2ae74
5 changed files with 100 additions and 25 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import (
"strings"
)
{{range .Operations}}
type {{.ResponseName}} = {{.ResponseType}}
// {{.OperationDoc}}
@@ -20,7 +21,7 @@ func {{.OperationName}}(ctx context.Context) (*{{.ResponseName}}, error) {
return nil, err
}
req = req.WithContext(ctx)
req = req.WithContext(ctx)
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
@@ -40,3 +41,4 @@ func {{.OperationName}}(ctx context.Context) (*{{.ResponseName}}, error) {
return &retval, nil
}
{{end}}