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
| Argument | Type | Description |
|---|---|---|
index | int | The index value. |
selector | BranchSelector | The selector value. |
edit | func(*ChildrenDraft) error | The edit value. |
Returns
The declared result.
errorFull signature
func (d *ChildrenDraft) EditBranchAt(
index int,
selector BranchSelector,
edit func(*ChildrenDraft) error,
) errorRelated types
ChildrenDraftChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.
BranchSelectorBranchSelector selects one structural child boundary, never a flattened path. Index identifies an authored tab; Tree/Case/Key identify plugin payload cases.