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

Method IsRequired

expr/attribute.go:447–449  ·  view source on GitHub ↗

IsRequired returns true if the given string matches the name of a required attribute, false otherwise. This method only applies to attributes of type Object.

(attName string)

Source from the content-addressed store, hash-verified

445// attribute, false otherwise. This method only applies to attributes of type
446// Object.
447func (a *AttributeExpr) IsRequired(attName string) bool {
448 return slices.Contains(a.AllRequired(), attName)
449}
450
451// IsRequiredNoDefault returns true if the given string matches the name of a
452// required attribute and the attribute has no default value, false otherwise.

Callers 15

IsPrimitivePointerMethod · 0.95
FinalizeMethod · 0.80
FinalizeMethod · 0.80
FinalizeMethod · 0.80
mapUnmappedAttrsMethod · 0.80
PathParamsMethod · 0.80
QueryParamsMethod · 0.80
PrepareMethod · 0.80
FinalizeMethod · 0.80
initAttrFunction · 0.80
ValidateMethod · 0.80

Calls 1

AllRequiredMethod · 0.95

Tested by 3

TestMethodFunction · 0.64