MCPcopy Create free account
hub / github.com/goadesign/goa / renderClientCLISectionCode

Function renderClientCLISectionCode

http/codegen/oneof_http_codegen_test.go:65–73  ·  view source on GitHub ↗

renderClientCLISectionCode renders the requested client CLI section for a DSL and returns the generated code.

(t *testing.T, dsl func(), fileIndex, sectionIndex int)

Source from the content-addressed store, hash-verified

63// renderClientCLISectionCode renders the requested client CLI section for a
64// DSL and returns the generated code.
65func renderClientCLISectionCode(t *testing.T, dsl func(), fileIndex, sectionIndex int) string {
66 t.Helper()
67
68 root := RunHTTPDSL(t, dsl)
69 services := CreateHTTPServices(root)
70 fs := ClientCLIFiles("", services)
71
72 return codegen.SectionCode(t, fs[fileIndex].SectionTemplates[sectionIndex])
73}
74
75// renderClientTypesCode renders the client type file for a single-service DSL.
76func renderClientTypesCode(t *testing.T, dsl func()) string {

Calls 4

SectionCodeFunction · 0.92
RunHTTPDSLFunction · 0.85
CreateHTTPServicesFunction · 0.85
ClientCLIFilesFunction · 0.70

Tested by

no test coverage detected