tree
List contents of a directory in tree-like format.
This CLI application is made using Commando.
Installation
$ GO111MODULE=on go get -u "github.com/thatisuday/tree"
Usage
$ go run tree.go --help
This tool lists the contents of a directory in tree-like format.
It can also display information about files and folders like size, permission and ownership.
Usage:
tree [dir] [flags]
tree <command> [flags]
Commands:
help displays usage informationn
info displays detailed information of a directory
version displays version number
Arguments:
dir local directory path (default: ./)
Flags:
-h, --help displays usage information of the application or a command (default: false)
-l, --level level of depth to travel (default: 1)
--size display size of the each file (default: false)
-v, --version displays version number (default: false)
Example
$ tree /projects/commando --level=2 --size
├── .gitignore (0kb)
├── LICENSE (1kb)
├── README.md (22kb)
├── assets
| ├── logo.png (284kb)
| └── logo.svg (87kb)
├── commando.go (20kb)
├── commando_test.go (10kb)
├── demo
| └── cmd.go (3kb)
├── go.mod (0kb)
├── go.sum (0kb)
├── templates.go (1kb)
└── tests
├── empty-exec-name.go (0kb)
├── invalid-default-value.go (0kb)
├── missing-action-function.go (0kb)
└── valid-registry.go (4kb)