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

ArgumentTypeDescription
namestringThe name value.
replacementstringThe replacement value.

Returns

The declared result.

error

Full signature

func (d *ChildrenDraft) RenameRoot( name, replacement string, ) error

Source field/graph_edit.go:481

Related types

  • ChildrenDraft

    ChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.