Skip to content

Commit

Permalink
DOM: Fix tpo in function name
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Kosegi <richard.kosegi@gmail.com>
  • Loading branch information
rkosegi committed Sep 2, 2024
1 parent 636194a commit 1b2fe03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dom/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ func encodeLeafFn(n Leaf) interface{} {
return n.Value()
}

func encoderListFn(n List) []interface{} {
func encodeListFn(n List) []interface{} {
res := make([]interface{}, n.Size())
for i, item := range n.Items() {
if item.IsContainer() {
res[i] = encodeContainerFn(item.(Container))
} else if item.IsList() {
res[i] = encoderListFn(item.(List))
res[i] = encodeListFn(item.(List))
} else {
res[i] = encodeLeafFn(item.(Leaf))
}
Expand All @@ -42,7 +42,7 @@ func encodeContainerFn(n Container) map[string]interface{} {
if v.IsContainer() {
res[k] = encodeContainerFn(v.(Container))
} else if v.IsList() {
res[k] = encoderListFn(v.(List))
res[k] = encodeListFn(v.(List))
} else {
res[k] = encodeLeafFn(v.(Leaf))
}
Expand Down
2 changes: 1 addition & 1 deletion dom/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (l *listImpl) Items() []Node {
}

func (l *listImpl) AsSlice() []interface{} {
return encoderListFn(l)
return encodeListFn(l)
}

func (l *listImpl) Size() int {
Expand Down

0 comments on commit 1b2fe03

Please sign in to comment.