Go-FilesysTree is a package which I build for another project but decided to publish to maybe help others with building a file system like tree data structure in Golang.
go get github.com/tim-koehler/go-filesystree
func main() {
fileList := []string{
"/foo/bar/baz.txt",
"/foo/bar/a.txt",
"/foo/bar/x.go",
"/tmp/a/b.c",
"/tmp/b/c.c",
"/tmp/b/d.c"}
fst := New()
for _, s := range fileList {
fst.AddFile(s, Metadata{
"Date": time.Now().String(),
})
}
}
...🚧 work in progress 🚧...