method
ChildrenDraft.RenameRoot
RenameRoot is the explicit root edit that also rewrites root selectors in descendants. It must be used on the resource's root draft.
Arguments
| Argument | Type | Description |
|---|---|---|
name | string | The name value. |
replacement | string | The replacement value. |
Returns
The declared result.
errorFull signature
func (d *ChildrenDraft) RenameRoot(
name,
replacement string,
) errorRelated types
ChildrenDraftChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.