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

Function URL

dsl/api.go:299–312  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

297// URL("https://goa.design")
298// })
299func 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}

Callers 2

TestMethodFunction · 0.85
dsl_spec_test.goFile · 0.85

Calls 3

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
SetURLMethod · 0.80

Tested by 1

TestMethodFunction · 0.68