File tree Expand file tree Collapse file tree 1 file changed +25
-26
lines changed Expand file tree Collapse file tree 1 file changed +25
-26
lines changed Original file line number Diff line number Diff line change @@ -574,7 +574,7 @@ Define a new tree.
574
574
575
575
``` go
576
576
t := tree.Root (" ." ).
577
- Child (" A" , " B" , " C" )
577
+ Child (" A" , " B" , " C" )
578
578
```
579
579
580
580
Print the tree.
@@ -592,18 +592,18 @@ Trees have the ability to nest.
592
592
593
593
``` go
594
594
t := tree.Root (" ." ).
595
- Child (" Item 1" ).
596
- Child (
597
- tree.Root (" Item 2" ).
598
- Child (" Item 2.1" ).
599
- Child (" Item 2.2" ).
600
- Child (" Item 2.3" ),
601
- ).
602
- Child (
603
- tree.Root (" Item 3" ).
604
- Child (" Item 3.1" ).
605
- Child (" Item 3.2" ),
606
- )
595
+ Child (" Item 1" ).
596
+ Child (
597
+ tree.Root (" Item 2" ).
598
+ Child (" Item 2.1" ).
599
+ Child (" Item 2.2" ).
600
+ Child (" Item 2.3" ),
601
+ ).
602
+ Child (
603
+ tree.Root (" Item 3" ).
604
+ Child (" Item 3.1" ).
605
+ Child (" Item 3.2" ),
606
+ )
607
607
```
608
608
609
609
Print the tree.
@@ -623,19 +623,18 @@ Trees can be customized via their enumeration function as well as using
623
623
enumeratorStyle := lipgloss.NewStyle ().Foreground (lipgloss.Color (" 99" )).MarginRight (1 )
624
624
itemStyle := lipgloss.NewStyle ().Foreground (lipgloss.Color (" 212" )).MarginRight (1 )
625
625
626
- t := tree.
627
- Root (" Makeup" ).
628
- Child (
629
- " Glossier" ,
630
- " Claire’s Boutique" ,
631
- " Nyx" ,
632
- " Mac" ,
633
- " Milk" ,
634
- ).
635
- Enumerator (tree.RoundedEnumerator ).
636
- EnumeratorStyle (enumeratorStyle).
637
- ItemStyle (itemStyle).
638
- RootStyle (lipgloss.NewStyle ().Foreground (lipgloss.Color (" #04B575" )))
626
+ t := tree.Root (" Makeup" ).
627
+ Child (
628
+ " Glossier" ,
629
+ " Claire’s Boutique" ,
630
+ " Nyx" ,
631
+ " Mac" ,
632
+ " Milk" ,
633
+ ).
634
+ Enumerator (tree.RoundedEnumerator ).
635
+ EnumeratorStyle (enumeratorStyle).
636
+ ItemStyle (itemStyle).
637
+ RootStyle (lipgloss.NewStyle ().Foreground (lipgloss.Color (" #04B575" )))
639
638
```
640
639
641
640
Print the tree.
You can’t perform that action at this time.
0 commit comments