 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package indenttree implements a simple text processor which parses a hierarchy defined using indentation; see Parse.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
	// contains filtered or unexported fields
}
    Node in a hierarchy returned by Parse.
func Parse ¶
Parse a multi-line input string into trees of nodes. For example:
a a1 a11 a2 b b1
is parsed into two Nodes (a and b). Node a has two children (a1, a2), and a2 has one child (a11); node b has one child (b1).
The indentation level is arbitrary but it must be consistent. across nodes. For example, the following is not valid:
a a1 b b1
Tabs cannot be used for indentation (they can cause confusion if editor settings vary). Nodes cannot be skipped, for example the following is not valid:
a
  a1
    a11
b
    b12
  
   Click to show internal directories. 
   Click to hide internal directories.