(iteratorName string, key, value cty.Value)
| 46 | } |
| 47 | |
| 48 | func (i *iteration) MakeChild(iteratorName string, key, value cty.Value) *iteration { |
| 49 | if i == nil { |
| 50 | // Create entirely new root iteration, then |
| 51 | return &iteration{ |
| 52 | IteratorName: iteratorName, |
| 53 | Key: key, |
| 54 | Value: value, |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | inherited := map[string]*iteration{} |
| 59 | for name, otherIt := range i.Inherited { |
| 60 | inherited[name] = otherIt |
| 61 | } |
| 62 | inherited[i.IteratorName] = i |
| 63 | return &iteration{ |
| 64 | IteratorName: iteratorName, |
| 65 | Key: key, |
| 66 | Value: value, |
| 67 | Inherited: inherited, |
| 68 | } |
| 69 | } |
no outgoing calls
no test coverage detected