]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/hashicorp/terraform/terraform/eval_sequence.go
vendor: Ignore github.com/hashicorp/terraform/backend
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / terraform / eval_sequence.go
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 n == nil {
11 continue
12 }
13
14 if _, err := EvalRaw(n, ctx); err != nil {
15 return nil, err
16 }
17 }
18
19 return nil, nil
20 }
21
22 // EvalNodeFilterable impl.
23 func (n *EvalSequence) Filter(fn EvalNodeFilterFunc) {
24 for i, node := range n.Nodes {
25 n.Nodes[i] = fn(node)
26 }
27 }