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

Method ExtractUserExamples

expr/attribute.go:651–660  ·  view source on GitHub ↗

ExtractUserExamples return the examples defined in the design directly on the attribute or on its type.

()

Source from the content-addressed store, hash-verified

649// ExtractUserExamples return the examples defined in the design directly on the
650// attribute or on its type.
651func (a *AttributeExpr) ExtractUserExamples() []*ExampleExpr {
652 if len(a.UserExamples) > 0 {
653 return a.UserExamples
654 }
655 ut, ok := a.Type.(UserType)
656 if !ok {
657 return nil
658 }
659 return ut.Attribute().ExtractUserExamples()
660}
661
662// Debug dumps the attribute to STDOUT in a goa developer friendly way.
663func (a *AttributeExpr) Debug(prefix string) { a.debug(prefix, make(map[*AttributeExpr]int), 0) }

Callers 4

ExampleMethod · 0.95
RemapMethod · 0.80
buildOperationFunction · 0.80
initExamplesFunction · 0.80

Calls 1

AttributeMethod · 0.65

Tested by

no test coverage detected