fixed: conversion of empty slices
@@ -85,10 +85,7 @@ func ValuesMapToValue(m url.Values) cty.Value {
}
func ListToValue(l []interface{}) cty.Value {
- if len(l) == 0 {
- return cty.NilVal
- }
- var list []cty.Value
+ list := []cty.Value{}
for _, v := range l {
list = append(list, GoToValue(v))
}
@@ -188,6 +185,7 @@ func ValueToStringSlice(src cty.Value) []string {
return l
}
+ l = []string{}
switch src.Type() {
case cty.NilType:
return l
