Skip to content

Commit

Permalink
docs(godoc): replace list mentions in tree package
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Aug 6, 2024
1 parent e19fbfe commit 81029f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tree/children.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package tree

// Children is the interface that wraps the basic methods of a list model.
// Children is the interface that wraps the basic methods of a tree model.
type Children interface {
// At returns the content item of the given index.
At(index int) Node

// Length returns the number of items in the list.
// Length returns the number of children in the tree.
Length() int
}

Expand Down Expand Up @@ -86,7 +86,7 @@ func (m *Filter) Filter(f func(index int) bool) *Filter {
return m
}

// Length returns the number of items in the list.
// Length returns the number of children in the tree.
func (m *Filter) Length() int {
j := 0
for i := 0; i < m.data.Length(); i++ {
Expand Down
8 changes: 4 additions & 4 deletions tree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ func (t *Tree) ItemStyleFunc(fn StyleFunc) *Tree {
return t
}

// Enumerator sets the enumerator implementation. This can be used to change the way the branches indicators look.
// Lipgloss includes predefined enumerators including bullets, roman numerals, and more. For
// example, you can have a numbered list:
// Enumerator sets the enumerator implementation. This can be used to change the
// way the branches indicators look. Lipgloss includes predefined enumerators
// for a classic or rounded tree. For example, you can have a rounded tree:
//
// tree.New().
// Enumerator(Arabic)
// Enumerator(RoundedEnumerator)
func (t *Tree) Enumerator(enum Enumerator) *Tree {
t.ensureRenderer().enumerator = enum
return t
Expand Down

0 comments on commit 81029f5

Please sign in to comment.