|
|
@ -76,8 +76,9 @@ func genLogicByRoute(dir string, group spec.Group, route spec.Route) error {
|
|
|
|
returnString := ""
|
|
|
|
returnString := ""
|
|
|
|
requestString := ""
|
|
|
|
requestString := ""
|
|
|
|
if len(route.ResponseType.Name) > 0 {
|
|
|
|
if len(route.ResponseType.Name) > 0 {
|
|
|
|
responseString = "(*types." + strings.Title(route.ResponseType.Name) + ", error)"
|
|
|
|
resp := strings.Title(route.ResponseType.Name)
|
|
|
|
returnString = "return nil, nil"
|
|
|
|
responseString = "(*types." + resp + ", error)"
|
|
|
|
|
|
|
|
returnString = fmt.Sprintf("return &types.%s{}, nil", resp)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
responseString = "error"
|
|
|
|
responseString = "error"
|
|
|
|
returnString = "return nil"
|
|
|
|
returnString = "return nil"
|
|
|
|