Skip to content

Latest commit

 

History

History
executable file
·
25 lines (20 loc) · 706 Bytes

README.md

File metadata and controls

executable file
·
25 lines (20 loc) · 706 Bytes

Go Report Card

texttree

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.

Install

go get -u github.com/kisulken/texttree

Example

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"))