Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hclwrite/ast_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (b *Body) SetAttributeRaw(name string, tokens Tokens) *Attribute {
if attr != nil {
attr.expr = attr.expr.ReplaceWith(expr)
} else {
attr := newAttribute()
attr = newAttribute()
attr.init(name, expr)
b.appendItem(attr)
}
Expand All @@ -171,7 +171,7 @@ func (b *Body) SetAttributeValue(name string, val cty.Value) *Attribute {
if attr != nil {
attr.expr = attr.expr.ReplaceWith(expr)
} else {
attr := newAttribute()
attr = newAttribute()
attr.init(name, expr)
b.appendItem(attr)
}
Expand All @@ -192,7 +192,7 @@ func (b *Body) SetAttributeTraversal(name string, traversal hcl.Traversal) *Attr
if attr != nil {
attr.expr = attr.expr.ReplaceWith(expr)
} else {
attr := newAttribute()
attr = newAttribute()
attr.init(name, expr)
b.appendItem(attr)
}
Expand Down