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())
| 116 | // }) |
| 117 | // }) |
| 118 | func 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 | // |
no test coverage detected