configs/configupgrade: Use single-line syntax for empty object exprs
This commit is contained in:
parent
bec4641867
commit
004c2056a7
|
@ -4,8 +4,12 @@ variable "s" {
|
|||
|
||||
variable "l" {
|
||||
type = "list"
|
||||
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "m" {
|
||||
type = "map"
|
||||
|
||||
default = {}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,12 @@ variable "s" {
|
|||
|
||||
variable "l" {
|
||||
type = list(string)
|
||||
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "m" {
|
||||
type = map(string)
|
||||
|
||||
default = {}
|
||||
}
|
||||
|
|
|
@ -184,6 +184,10 @@ Value:
|
|||
buf.WriteString("]")
|
||||
|
||||
case *hcl1ast.ObjectType:
|
||||
if len(tv.List.Items) == 0 {
|
||||
buf.WriteString("{}")
|
||||
break
|
||||
}
|
||||
buf.WriteString("{\n")
|
||||
for _, item := range tv.List.Items {
|
||||
if len(item.Keys) != 1 {
|
||||
|
|
Loading…
Reference in New Issue