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

Function generateExample

codegen/cli/cli.go:585–591  ·  view source on GitHub ↗
(sub *SubcommandData, svc string)

Source from the content-addressed store, hash-verified

583}
584
585func generateExample(sub *SubcommandData, svc string) {
586 ex := codegen.KebabCase(svc) + " " + codegen.KebabCase(sub.Name)
587 for _, f := range sub.Flags {
588 ex += " --" + f.Name + " " + f.Example
589 }
590 sub.Example = ex
591}
592
593// fieldCode generates code to initialize the data structures fields
594// from the given args. It is used only in templates.

Callers 1

BuildSubcommandDataFunction · 0.85

Calls 1

KebabCaseFunction · 0.92

Tested by

no test coverage detected