hcl/printer: make boolean logic one line
This commit is contained in:
parent
b24dfd1bb1
commit
0704c168e1
@ -178,13 +178,11 @@ func (p *printer) objectItem(o *ast.ObjectItem) []byte {
|
|||||||
buf.WriteByte(blank)
|
buf.WriteByte(blank)
|
||||||
|
|
||||||
// reach end of key
|
// reach end of key
|
||||||
if i == len(o.Keys)-1 {
|
if o.Assign.IsValid() && i == len(o.Keys)-1 && len(o.Keys) == 1 {
|
||||||
if o.Assign.IsValid() && len(o.Keys) == 1 {
|
|
||||||
buf.WriteString("=")
|
buf.WriteString("=")
|
||||||
buf.WriteByte(blank)
|
buf.WriteByte(blank)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
buf.Write(p.output(o.Val))
|
buf.Write(p.output(o.Val))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user