Documentation
¶
Index ¶
Constants ¶
View Source
const ( EdgeEmpty = " " EdgePipe = "│ " EdgeItem = "├── " EdgeLast = "└── " )
Box-drawing symbols
Variables ¶
View Source
var DefaultPrinter = NewPrinter(os.Stdout, nil)
DefaultPrinter prints the tree to the stdout with default settings.
Functions ¶
Types ¶
type Node ¶
Node represents a tree node.
func (*Node) AddPathString ¶
type Printer ¶
Printer prints the tree.
func NewPrinter ¶
func NewPrinter(writer io.Writer, format FormaterFunc) Printer
type PrinterFunc ¶
PrinterFunc type is an adapter to allow the use of ordinary functions as a printer.
func (PrinterFunc) Print ¶
func (f PrinterFunc) Print(root *Node) error
Click to show internal directories.
Click to hide internal directories.