}
func (e *TemplateExpr) walkChildNodes(w internalWalkFunc) {
- for i, part := range e.Parts {
- e.Parts[i] = w(part).(Expression)
+ for _, part := range e.Parts {
+ w(part)
}
}
Detail: fmt.Sprintf(
"The expression result is null. Cannot include a null value in a string template.",
),
- Subject: part.Range().Ptr(),
- Context: &e.SrcRange,
+ Subject: part.Range().Ptr(),
+ Context: &e.SrcRange,
+ Expression: part,
+ EvalContext: ctx,
})
continue
}
"Cannot include the given value in a string template: %s.",
err.Error(),
),
- Subject: part.Range().Ptr(),
- Context: &e.SrcRange,
+ Subject: part.Range().Ptr(),
+ Context: &e.SrcRange,
+ Expression: part,
+ EvalContext: ctx,
})
continue
}
}
func (e *TemplateJoinExpr) walkChildNodes(w internalWalkFunc) {
- e.Tuple = w(e.Tuple).(Expression)
+ w(e.Tuple)
}
func (e *TemplateJoinExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
Detail: fmt.Sprintf(
"An iteration result is null. Cannot include a null value in a string template.",
),
- Subject: e.Range().Ptr(),
+ Subject: e.Range().Ptr(),
+ Expression: e,
+ EvalContext: ctx,
})
continue
}
"Cannot include one of the interpolation results into the string template: %s.",
err.Error(),
),
- Subject: e.Range().Ptr(),
+ Subject: e.Range().Ptr(),
+ Expression: e,
+ EvalContext: ctx,
})
continue
}
}
func (e *TemplateWrapExpr) walkChildNodes(w internalWalkFunc) {
- e.Wrapped = w(e.Wrapped).(Expression)
+ w(e.Wrapped)
}
func (e *TemplateWrapExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {