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

Function Services

dsl/server.go:89–96  ·  view source on GitHub ↗

Services sets the list of services implemented by a server. Services must appear in a Server expression. Services takes one or more strings as argument corresponding to service names. Example: var _ = Server("calcsvr", func() { Services("calc", "adder") Services("other") // Multiple c

(svcs ...string)

Source from the content-addressed store, hash-verified

87// Services("other") // Multiple calls to Services are OK
88// })
89func Services(svcs ...string) {
90 s, ok := eval.Current().(*expr.ServerExpr)
91 if !ok {
92 eval.IncompatibleDSL()
93 return
94 }
95 s.Services = append(s.Services, svcs...)
96}
97
98// Host defines a server host. A single server may define multiple hosts. Each
99// host lists the set of URIs that identify it.

Callers 3

openapi_dsls.goFile · 0.85
dsls.goFile · 0.85
service_dsls.goFile · 0.85

Calls 2

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92

Tested by

no test coverage detected