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

Function buildSubcommandData

http/codegen/client_cli.go:86–101  ·  view source on GitHub ↗
(sd *ServiceData, e *EndpointData)

Source from the content-addressed store, hash-verified

84}
85
86func buildSubcommandData(sd *ServiceData, e *EndpointData) *subcommandData {
87 flags, buildFunction := buildFlags(sd, e)
88
89 sub := &subcommandData{
90 SubcommandData: cli.BuildSubcommandData(sd.Service, e.Method, buildFunction, flags),
91 }
92 if e.MultipartRequestEncoder != nil {
93 sub.MultipartVarName = e.MultipartRequestEncoder.VarName
94 sub.MultipartFuncName = e.MultipartRequestEncoder.FuncName
95 }
96 if e.Method.SkipRequestBodyEncodeDecode {
97 sub.StreamFlag = streamFlag(sd.Service.Name, e.Method.Name)
98 sub.BuildStreamPayload = e.BuildStreamPayload
99 }
100 return sub
101}
102
103// endpointParser returns the file that implements the command line parser that
104// builds the client endpoint and payload necessary to perform a request.

Callers 1

ClientCLIFilesFunction · 0.85

Calls 3

BuildSubcommandDataFunction · 0.92
streamFlagFunction · 0.85
buildFlagsFunction · 0.70

Tested by

no test coverage detected