tree

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package tree is used to build up a tree from a slice of paths and print it to the standard output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(paths []string)

Print prints the paths passed as a tree on the console.

Types

type Node

type Node struct {
	Name     string
	Children []*Node
}

Node represents a system folder or file.

func Build

func Build(paths []string) *Node

Build constructs the tree and returns the root node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL