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

Function validateSet

eval/eval.go:225–240  ·  view source on GitHub ↗

validateSet runs the validation on all the set expressions that define one.

(set ExpressionSet)

Source from the content-addressed store, hash-verified

223
224// validateSet runs the validation on all the set expressions that define one.
225func validateSet(set ExpressionSet) {
226 errors := &ValidationErrors{}
227 for _, def := range set {
228 if def == nil {
229 continue
230 }
231 if validate, ok := def.(Validator); ok {
232 if err := validate.Validate(); err != nil {
233 errors.AddError(def, err)
234 }
235 }
236 }
237 if len(errors.Errors) > 0 {
238 Context.Record(&Error{GoError: errors})
239 }
240}
241
242// finalizeSet runs the finalizer on all the set expressions that define one.
243func finalizeSet(set ExpressionSet) {

Callers 1

RunDSLFunction · 0.85

Calls 3

AddErrorMethod · 0.95
RecordMethod · 0.80
ValidateMethod · 0.65

Tested by

no test coverage detected