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

Function goifyTerms

codegen/cli/cli.go:568–577  ·  view source on GitHub ↗

goifyTerms makes valid go identifiers out of the supplied terms

(terms ...string)

Source from the content-addressed store, hash-verified

566
567// goifyTerms makes valid go identifiers out of the supplied terms
568func goifyTerms(terms ...string) string {
569 res := codegen.Goify(terms[0], false)
570 if len(terms) == 1 {
571 return res
572 }
573 for _, t := range terms[1:] {
574 res += codegen.Goify(t, true)
575 }
576 return res
577}
578
579func printDescription(desc string) string {
580 res := strings.ReplaceAll(desc, "`", "`+\"`\"+`")

Callers 2

BuildSubcommandDataFunction · 0.85
NewFlagDataFunction · 0.85

Calls 1

GoifyFunction · 0.92

Tested by

no test coverage detected