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

Function SectionCode

codegen/testing.go:31–33  ·  view source on GitHub ↗

SectionCode generates and formats the code for the given section.

(t *testing.T, section *SectionTemplate)

Source from the content-addressed store, hash-verified

29
30// SectionCode generates and formats the code for the given section.
31func SectionCode(t *testing.T, section *SectionTemplate) string {
32 return sectionCodeWithPrefix(t, section, "package foo\n")
33}
34
35// SectionsCode generates and formats the code for the given sections.
36func SectionsCode(t *testing.T, sections []*SectionTemplate) string {

Callers 15

TestBodyTypeDeclFunction · 0.92
TestBodyTypeInitFunction · 0.92
TestEncodeErrorFunction · 0.92
TestClientDecodeFunction · 0.92
TestCookieAPIKeySecurityFunction · 0.92
TestServerMountFunction · 0.92
renderClientDecodeCodeFunction · 0.92
TestClientEncodeFunction · 0.92
TestClientBuildRequestFunction · 0.92
TestServerHandlerFunction · 0.92
TestEncodeFunction · 0.92

Calls 1

sectionCodeWithPrefixFunction · 0.85

Tested by 15

TestBodyTypeDeclFunction · 0.74
TestBodyTypeInitFunction · 0.74
TestEncodeErrorFunction · 0.74
TestClientDecodeFunction · 0.74
TestCookieAPIKeySecurityFunction · 0.74
TestServerMountFunction · 0.74
renderClientDecodeCodeFunction · 0.74
TestClientEncodeFunction · 0.74
TestClientBuildRequestFunction · 0.74
TestServerHandlerFunction · 0.74
TestEncodeFunction · 0.74