github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/terraform/eval_sequence.go (about) 1 package terraform 2 3 // EvalSequence is an EvalNode that evaluates in sequence. 4 type EvalSequence struct { 5 Nodes []EvalNode 6 } 7 8 func (n *EvalSequence) Eval(ctx EvalContext) (interface{}, error) { 9 for _, n := range n.Nodes { 10 if _, err := EvalRaw(n, ctx); err != nil { 11 return nil, err 12 } 13 } 14 15 return nil, nil 16 } 17 18 // EvalNodeFilterable impl. 19 func (n *EvalSequence) Filter(fn EvalNodeFilterFunc) { 20 for i, node := range n.Nodes { 21 n.Nodes[i] = fn(node) 22 } 23 }