TextTree is a file buffer that stores files content in memory and allows access to it by path. It is useful for working with localization trees.
go get -u github.com/kisulken/texttree
import "github.com/bazuker/texttree/v1"
...
tt, err := texttree.NewTextTree("sample", texttree.DefaultMaxFileSize) // loads the files here
if err != nil {
panic(err)
}
fmt.Println(tt.Entities())
fmt.Println(tt.GetString("a/hello"))
fmt.Println(tt.Get("b/hello.txt").Content)
fmt.Println(tt.GetStringSub("b", "c/quack"))