MCPcopy
hub / github.com/hashicorp/hcl / setName

Method setName

hclwrite/ast_attribute.go:54–57  ·  view source on GitHub ↗

setName updates the name of the attribute.

(name string)

Source from the content-addressed store, hash-verified

52
53// setName updates the name of the attribute.
54func (a *Attribute) setName(name string) {
55 nameObj := newIdentifier(newIdentToken(name))
56 a.name = a.name.ReplaceWith(nameObj)
57}

Callers 1

RenameAttributeMethod · 0.80

Calls 3

newIdentifierFunction · 0.85
newIdentTokenFunction · 0.85
ReplaceWithMethod · 0.80

Tested by

no test coverage detected