method

ChildrenDraft.EditBranchAt

EditBranchAt addresses a layout by its authored position when names are absent or ambiguous. The selector still identifies a structural boundary.

Arguments

ArgumentTypeDescription
indexintThe index value.
selectorBranchSelectorThe selector value.
editfunc(*ChildrenDraft) errorThe edit value.

Returns

The declared result.

error

Full signature

func (d *ChildrenDraft) EditBranchAt( index int, selector BranchSelector, edit func(*ChildrenDraft) error, ) error

Source field/graph_edit.go:388

Related types

  • ChildrenDraft

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

  • BranchSelector

    BranchSelector selects one structural child boundary, never a flattened path. Index identifies an authored tab; Tree/Case/Key identify plugin payload cases.