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

Function Param

dsl/http.go:715–726  ·  view source on GitHub ↗

Param describes a single HTTP request path or query string parameter. Param must appear in the API HTTP expression (to define request parameters common to all the API endpoints), a service HTTP expression to define common parameters to all the service methods or a specific method HTTP expression. P

(name string, args ...any)

Source from the content-addressed store, hash-verified

713// })
714// })
715func Param(name string, args ...any) {
716 p := params(eval.Current())
717 if p == nil {
718 eval.IncompatibleDSL()
719 return
720 }
721 if name == "" {
722 eval.ReportError("parameter name cannot be empty")
723 }
724 eval.Execute(func() { Attribute(name, args...) }, p.AttributeExpr)
725 p.Remap()
726}
727
728// MapParams describes the query string parameters in a HTTP request.
729//

Calls 7

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
ReportErrorFunction · 0.92
ExecuteFunction · 0.92
paramsFunction · 0.85
AttributeFunction · 0.85
RemapMethod · 0.80