Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tim-koehler/go-filesystree
Go-FilesysTree is a package to maybe help others with building a file-system like tree data structure in Golang.
https://github.com/tim-koehler/go-filesystree
file-tree filesystem golang tree tree-structure
Last synced: 6 days ago
JSON representation
Go-FilesysTree is a package to maybe help others with building a file-system like tree data structure in Golang.
- Host: GitHub
- URL: https://github.com/tim-koehler/go-filesystree
- Owner: tim-koehler
- Created: 2020-11-27T12:43:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-07T22:06:49.000Z (about 4 years ago)
- Last Synced: 2024-11-16T20:44:13.462Z (2 months ago)
- Topics: file-tree, filesystem, golang, tree, tree-structure
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go-FilesysTree ![Test Badge](https://github.com/tim-koehler/go-filesystree/workflows/Tests/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/tim-koehler/go-filesystree/badge.svg?branch=master)](https://coveralls.io/github/tim-koehler/go-filesystree?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/tim-koehler/go-filesystree)](https://goreportcard.com/report/github.com/tim-koehler/go-filesystree)
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.## Getting Started
```bash
go get github.com/tim-koehler/go-filesystree
```### Examples
```go
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 🚧...