mirror of
https://github.com/antonmedv/fx
synced 2024-11-17 09:25:32 +00:00
23 lines
337 B
Go
23 lines
337 B
Go
package main
|
|
|
|
type node struct {
|
|
prev, next, end *node
|
|
depth uint8
|
|
key []byte
|
|
value []byte
|
|
comma bool
|
|
}
|
|
|
|
func (n *node) append(child *node) {
|
|
if n.end == nil {
|
|
n.end = n
|
|
}
|
|
n.end.next = child
|
|
child.prev = n.end
|
|
if child.end == nil {
|
|
n.end = child
|
|
} else {
|
|
n.end = child.end
|
|
}
|
|
}
|