@@ -106,7 +106,7 @@ func H(tag string, props map[string]any, children ...any) *VDomElem {
106106 rtn := & VDomElem {Tag : tag , Props : props }
107107 if len (children ) > 0 {
108108 for _ , part := range children {
109- elems := PartToElems (part )
109+ elems := ToElems (part )
110110 rtn .Children = append (rtn .Children , elems ... )
111111 }
112112 }
@@ -355,12 +355,12 @@ func QueueRefOp(ctx context.Context, ref *VDomRef, op VDomRefOperation) {
355355 vc .QueueRefOp (ctx , op )
356356}
357357
358- // PartToElems converts various types into VDomElem slices for use in VDOM children.
358+ // ToElems converts various types into VDomElem slices for use in VDOM children.
359359// It handles strings, booleans, VDomElems, *VDomElem, slices, and other types
360360// by converting them to appropriate VDomElem representations.
361361// nil values are ignored and removed from the final slice.
362362// This is primarily an internal function and not typically called directly by application code.
363- func PartToElems (part any ) []VDomElem {
363+ func ToElems (part any ) []VDomElem {
364364 if part == nil {
365365 return nil
366366 }
@@ -385,7 +385,7 @@ func PartToElems(part any) []VDomElem {
385385 if partVal .Kind () == reflect .Slice {
386386 var rtn []VDomElem
387387 for i := 0 ; i < partVal .Len (); i ++ {
388- rtn = append (rtn , PartToElems (partVal .Index (i ).Interface ())... )
388+ rtn = append (rtn , ToElems (partVal .Index (i ).Interface ())... )
389389 }
390390 return rtn
391391 }
0 commit comments