Documentation
¶
Overview ¶
Package tree create and print tree.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree struct {
Name string
// contains filtered or unexported fields
}
Tree struct of tree
Example ¶
package main
import (
"fmt"
"os"
"github.com/Konstantin8105/tree"
)
func main() {
artist := tree.New("Pantera")
album := tree.New("Far Beyond Driven")
album.Add("5 minutes Alone")
album.Add("Some another")
artist.Add(album)
artist.Add("Power Metal")
fmt.Fprintf(os.Stdout, "%s\n", artist)
}
Output: Pantera ├──Far Beyond Driven │ ├──5 minutes Alone │ └──Some another └──Power Metal
Click to show internal directories.
Click to hide internal directories.