Skip to content

TextTree is a file buffer that stores files content in memory and allow access to it by path. It is useful for working with localization trees.

License

Notifications You must be signed in to change notification settings

bazuker/texttree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

TextTree is a file buffer that stores files content in memory and allow access to it by path. It is useful for working with localization trees.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages