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

Function Contact

dsl/api.go:118–128  ·  view source on GitHub ↗

Contact sets the API contact information. Contact must appear in an API expression. Contact takes a single argument which is the defining DSL. Example: var _ = API("divider", func() { Contact(func() { Name("support") Email("support@goa.design") URL("https://goa.d

(fn func())

Source from the content-addressed store, hash-verified

116// })
117// })
118func Contact(fn func()) {
119 contact := new(expr.ContactExpr)
120 if !eval.Execute(fn, contact) {
121 return
122 }
123 if a, ok := eval.Current().(*expr.APIExpr); ok {
124 a.Contact = contact
125 return
126 }
127 eval.IncompatibleDSL()
128}
129
130// License sets the API license information.
131//

Callers 1

dsl_spec_test.goFile · 0.50

Calls 3

ExecuteFunction · 0.92
CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92

Tested by

no test coverage detected