Versions in this module Expand all Collapse all v1 v1.0.0 Jul 24, 2025 Changes in this version + const Break + const Continue + func AddAt[T NodeValue](p *Plan, name string, init func(w *T)) + func AddChildAt[T NodeValue](parent Node, name string, init func(w *T)) + func AddChildInit[T NodeValue](parent Node, name string, init func(w *T)) + func AddChild[T NodeValue](parent Node, init func(w *T)) + func AddInit[T NodeValue](p *Plan, name string, init func(w *T)) + func AddNew[T Node](p *Plan, name string, new func() T, init func(w T)) + func Add[T NodeValue](p *Plan, init func(w *T)) + func AutoPlanName(level int) string + func ChildByType[T Node](n Node, startIndex ...int) T + func EscapePathName(name string) string + func IndexByName(slice []Node, name string, startIndex ...int) int + func IndexOf(slice []Node, child Node, startIndex ...int) int + func InitNode(n Node) + func IsNil(n Node) bool + func IsNode(typ reflect.Type) bool + func IsRoot(n Node) bool + func MoveToParent(child Node, parent Node) + func New[T NodeValue](parent ...Node) *T + func ParentByType[T Node](n Node) T + func SetParent(child Node, parent Node) + func SetUniqueName(n Node) + func SetUniqueNameIfDuplicate(par, child Node) bool + func UnescapePathName(name string) string + func Update(n Node, p TypePlan) bool + func UpdateSlice(slice *[]Node, parent Node, p TypePlan) bool + type Node interface + AsTree func() *NodeBase + CopyFieldsFrom func(from Node) + Destroy func() + Init func() + NodeWalkDown func(fun func(n Node) bool) + OnAdd func() + func Last(n Node) Node + func NewOfType(typ *types.Type, parent ...Node) Node + func Next(n Node) Node + func NextSibling(n Node) Node + func Previous(n Node) Node + func Root(n Node) Node + func UnmarshalRootJSON(b []byte) (Node, error) + type NodeBase struct + Children []Node + Makers tiered.Tiered[[]func(p *Plan)] + Name string + OnChildAdded func(n Node) + Parent Node + Properties map[string]any + This Node + Updaters tiered.Tiered[[]func()] + func NewNodeBase(parent ...Node) *NodeBase + func (n *NodeBase) AddChild(kid Node) + func (n *NodeBase) AsTree() *NodeBase + func (n *NodeBase) Child(i int) Node + func (n *NodeBase) ChildByName(name string, startIndex ...int) Node + func (n *NodeBase) Clone() Node + func (n *NodeBase) CopyFieldsFrom(from Node) + func (n *NodeBase) CopyFrom(from Node) + func (n *NodeBase) Delete() + func (n *NodeBase) DeleteChild(child Node) bool + func (n *NodeBase) DeleteChildAt(index int) bool + func (n *NodeBase) DeleteChildByName(name string) bool + func (n *NodeBase) DeleteChildren() + func (n *NodeBase) DeleteProperty(key string) + func (n *NodeBase) Destroy() + func (n *NodeBase) FindPath(path string) Node + func (n *NodeBase) HasChildren() bool + func (n *NodeBase) IndexInParent() int + func (n *NodeBase) Init() + func (n *NodeBase) InsertChild(kid Node, index int) + func (n *NodeBase) MarshalJSON() ([]byte, error) + func (n *NodeBase) NewChild(typ *types.Type) Node + func (n *NodeBase) NewInstance() Node + func (n *NodeBase) NodeType() *types.Type + func (n *NodeBase) NodeWalkDown(fun func(n Node) bool) + func (n *NodeBase) NumChildren() int + func (n *NodeBase) OnAdd() + func (n *NodeBase) ParentByName(name string) Node + func (n *NodeBase) ParentLevel(parent Node) int + func (n *NodeBase) Path() string + func (n *NodeBase) PathFrom(parent Node) string + func (n *NodeBase) PlanName() string + func (n *NodeBase) Property(key string) any + func (n *NodeBase) SetProperty(key string, value any) + func (n *NodeBase) String() string + func (n *NodeBase) UnmarshalJSON(b []byte) error + func (n *NodeBase) WalkDown(fun func(n Node) bool) + func (n *NodeBase) WalkDownBreadth(fun func(n Node) bool) + func (n *NodeBase) WalkDownPost(shouldContinue func(n Node) bool, fun func(n Node) bool) + func (n *NodeBase) WalkUp(fun func(n Node) bool) bool + func (n *NodeBase) WalkUpParent(fun func(n Node) bool) bool + func (nb *NodeBase) FinalMaker(maker func(p *Plan)) + func (nb *NodeBase) FinalUpdater(updater func()) + func (nb *NodeBase) FirstMaker(maker func(p *Plan)) + func (nb *NodeBase) FirstUpdater(updater func()) + func (nb *NodeBase) Make(p *Plan) + func (nb *NodeBase) Maker(maker func(p *Plan)) + func (nb *NodeBase) RunUpdaters() + func (nb *NodeBase) UpdateFromMake() + func (nb *NodeBase) Updater(updater func()) + func (nb NodeBase) NodeValue() + func (t *NodeBase) SetName(v string) *NodeBase + func (t *NodeBase) SetOnChildAdded(v func(n Node)) *NodeBase + type NodeValue interface + NodeValue func() + type Plan struct + Children []*PlanItem + EnforceEmpty bool + func (p *Plan) Add(name string, new func() Node, init func(w Node)) + func (p *Plan) Update(n Node) + type PlanItem struct + Init []func(n Node) + Name string + New func() Node + type TypePlan []TypePlanItem + func (t *TypePlan) Add(typ *types.Type, name string) + type TypePlanItem struct + Name string + Type *types.Type