This is another variation of the function above which generates only the parameter names: ", foo, bar, baz"
(params []ParameterDefinition)
| 104 | // parameter names: |
| 105 | // ", foo, bar, baz" |
| 106 | func genParamNames(params []ParameterDefinition) string { |
| 107 | if len(params) == 0 { |
| 108 | return "" |
| 109 | } |
| 110 | parts := make([]string, len(params)) |
| 111 | for i, p := range params { |
| 112 | parts[i] = p.GoVariableName() |
| 113 | } |
| 114 | return ", " + strings.Join(parts, ", ") |
| 115 | } |
| 116 | |
| 117 | // genResponsePayload generates the payload returned at the end of each client request function |
| 118 | func genResponsePayload(operationID string) string { |
nothing calls this directly
no test coverage detected