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