Skip to content

Commit db0be3e

Browse files
committed
refactor(go): reduce code duplication by re-using existing method
1 parent a1edfb6 commit db0be3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/routes.go.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ endpoints.forEach(function(endpoint) {
217217
218218
<%- resultVariableDeclaration %>
219219
args := map[string]interface{}{
220-
<%- /* LATER: extract */ params.map(p => `"${p.substring(2)}": ${placeholdersMap['go'][p.substring(0, 1)](p.substring(2))},`).join('\n\t\t\t') %>
220+
<%- formatParamsAsGolangMap(params) %>
221221
}
222222
err = stmt.<%- queryFunction %>(&result, args)
223223
<% } else { -%>

0 commit comments

Comments
 (0)