GoTree is a Golang implementation of the UNIX tree program, which produces a depth-indented listing of files.
Use go get to install and update:
$ go get -u github.com/std0/gotreeUse go run or go build to run or build the program, respectively.
$ go run main.go PATH [options]$ go build
$ ./gotree PATH [options]Available options:
-f optional. Output both files and dirs (default is dirs only)
$ go run main.go testdata -f
testdata
├───dir1
│ ├───dir1_1
│ │ └───text1_1_1.txt (665b)
│ └───text1_1.txt (835b)
├───dir2
│ └───text2_1.txt (empty)
└───text1.txt (551b)$ go build
$ ./gotree testdata -f
testdata
├───dir1
│ ├───dir1_1
│ │ └───text1_1_1.txt (665b)
│ └───text1_1.txt (835b)
├───dir2
│ └───text2_1.txt (empty)
└───text1.txt (551b)