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

Method AddRequired

expr/attribute.go:900–907  ·  view source on GitHub ↗

AddRequired merges the required fields into v.

(required ...string)

Source from the content-addressed store, hash-verified

898
899// AddRequired merges the required fields into v.
900func (v *ValidationExpr) AddRequired(required ...string) {
901 for _, r := range required {
902 found := slices.Contains(v.Required, r)
903 if !found {
904 v.Required = append(v.Required, r)
905 }
906 }
907}
908
909// RemoveRequired removes the given field from the list of required fields.
910func (v *ValidationExpr) RemoveRequired(required string) {

Callers 12

PathParamsMethod · 0.95
QueryParamsMethod · 0.95
MergeMethod · 0.95
FinalizeMethod · 0.80
FinalizeMethod · 0.80
FinalizeMethod · 0.80
mapUnmappedAttrsMethod · 0.80
PrepareMethod · 0.80
FinalizeMethod · 0.80
initAttrFunction · 0.80
inheritValidationsMethod · 0.80
RequiredFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected