MCPcopy
hub / github.com/hashicorp/hcl / ExprList

Method ExprList

hcltest/mock.go:158–170  ·  view source on GitHub ↗

Implementation for hcl.ExprList

()

Source from the content-addressed store, hash-verified

156
157// Implementation for hcl.ExprList
158func (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
173func (e mockExprLiteral) ExprMap() []hcl.KeyValuePair {

Callers

nothing calls this directly

Calls 2

MockExprLiteralFunction · 0.85
TypeMethod · 0.45

Tested by

no test coverage detected