Skip to content

Commit a1ca6e7

Browse files
committed
move renderSequenceState to spec.go
1 parent 350789b commit a1ca6e7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

core/dbio/api/spec.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,18 @@ func (ep *Endpoint) Evaluate(expr string, state map[string]interface{}) (result
525525
return ep.eval.Evaluate(expr, state, iop.GlobalFunctionMap)
526526
}
527527

528+
// renderSequenceState renders the endpoint's state templates in-place, the same
529+
// way the main request path does via renderInitial().
530+
func (ep *Endpoint) renderSequenceState() error {
531+
iter := &Iteration{
532+
id: g.F("seq.%s", ep.Name),
533+
endpoint: ep,
534+
state: ep.State,
535+
context: g.NewContext(ep.context.Ctx),
536+
}
537+
return iter.renderInitial()
538+
}
539+
528540
// Names returns names in alphabetical order
529541
func (eps Endpoints) Names() (names []string) {
530542
for _, e := range eps {

0 commit comments

Comments
 (0)