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

Function runSet

eval/eval.go:190–209  ·  view source on GitHub ↗

runSet executes the DSL for all expressions in the given set. The expression DSLs may append to the set as they execute.

(set ExpressionSet)

Source from the content-addressed store, hash-verified

188// runSet executes the DSL for all expressions in the given set. The expression
189// DSLs may append to the set as they execute.
190func runSet(set ExpressionSet) {
191 executed := 0
192 recursed := 0
193 for executed < len(set) {
194 recursed++
195 for _, def := range set[executed:] {
196 executed++
197 if def == nil {
198 continue
199 }
200 if source, ok := def.(Source); ok {
201 Execute(source.DSL(), def)
202 }
203 }
204 if recursed > 100 {
205 Context.Record(&Error{GoError: fmt.Errorf("too many generated expressions, infinite loop?")})
206 return
207 }
208 }
209}
210
211// prepareSet runs the pre validation steps on all the set expressions that
212// define one.

Callers

nothing calls this directly

Calls 3

ExecuteFunction · 0.85
RecordMethod · 0.80
DSLMethod · 0.65

Tested by

no test coverage detected