// GetRootNode - Find and return the root node of the tree
Find and return the root node of the tree
// GetRootNode - Find and return the root node of the tree
func (tree *LinkedTree) GetRootNode() (*LinkedTreeNode, error) {
	tree.mux.Lock()
	defer tree.mux.Unlock()
	if tree.root != nil {
		return tree.root, nil
	}
	return nil, fmt.Errorf("Can't get a node from a tree without a root node")
}
func ( tree * LinkedTree ) GetRootNode ( ) ( * LinkedTreeNode , error ) { tree . mux . Lock ( ) defer tree . mux . Unlock ( ) if tree . root != nil { return tree . root , nil } return nil , fmt . Errorf ( " " ) }
Find and return the root node of the tree
Find and return the root node of the tree