You can take a look on [`cmd/tree`](https://github.com/a8m/tree/blob/master/cmd/tree/tree.go), and [s3tree](http://github.com/a8m/s3tree) or see the example below.
```go
import (
"github.com/a8m/tree"
)
func main() {
opts := &tree.Options{
// Fs, and OutFile are required fields.
// fs should implement the tree file-system interface(see: tree.Fs),