Implementation for hcl.ExprList
()
| 156 | |
| 157 | // Implementation for hcl.ExprList |
| 158 | func (e mockExprLiteral) ExprList() []hcl.Expression { |
| 159 | v := e.V |
| 160 | ty := v.Type() |
| 161 | if v.IsKnown() && !v.IsNull() && (ty.IsListType() || ty.IsTupleType()) { |
| 162 | ret := make([]hcl.Expression, 0, v.LengthInt()) |
| 163 | for it := v.ElementIterator(); it.Next(); { |
| 164 | _, v := it.Element() |
| 165 | ret = append(ret, MockExprLiteral(v)) |
| 166 | } |
| 167 | return ret |
| 168 | } |
| 169 | return nil |
| 170 | } |
| 171 | |
| 172 | // Implementation for hcl.ExprMap |
| 173 | func (e mockExprLiteral) ExprMap() []hcl.KeyValuePair { |
nothing calls this directly
no test coverage detected