URL sets the contact, license or external documentation URL. URL must appear in Contact, License, Docs, or any expression implementing URLHolder. URL accepts a single argument which is the URL. Example: Docs(func() { URL("https://goa.design") })
(url string)
| 297 | // URL("https://goa.design") |
| 298 | // }) |
| 299 | func URL(url string) { |
| 300 | switch def := eval.Current().(type) { |
| 301 | case *expr.ContactExpr: |
| 302 | def.URL = url |
| 303 | case *expr.LicenseExpr: |
| 304 | def.URL = url |
| 305 | case *expr.DocsExpr: |
| 306 | def.URL = url |
| 307 | case expr.URLHolder: |
| 308 | def.SetURL(url) |
| 309 | default: |
| 310 | eval.IncompatibleDSL() |
| 311 | } |
| 312 | } |