nodelist.go
func (l *NodeList) Remove(key []byte) *skiplist.Node {
	var prev *skiplist.Node
	node := l.head
	for node != nil {
		nodeKey := (*Item)(node.Item()).Bytes()
		if bytes.Equal(nodeKey, key) {
			if prev == nil {
				l.head = node.GetLink()
				return node
			}

			prev.SetLink(node.GetLink())
			return node
		}
		prev = node
		node = node.GetLink()
	}

	return nil
}
func (l *NodeList) Remove(key []byte) *skiplist.Node {
	var prev *skiplist.Node
	node := l.head
	for node != nil {
		nodeKey := (*Item)(node.Item()).Bytes()
		if bytes.Equal(nodeKey, key) {
			if prev == nil {
				l.head = node.GetLink()
				return node
			}

			prev.SetLink(node.GetLink())
			return node
		}
		prev = node
		node = node.GetLink()
	}

	return nil
}
// Remove a key from the node list