package datastore import ( "fmt" "testing" "go.destrealm.net/vfs" ) func Test_LoadChats(t *testing.T) { fs, _ := vfs.NewVFS("../../data/chats") c, err := LoadChats(fs) if err != nil { t.Error(err) } fmt.Println("chats:", c) fmt.Println(c.ChatIDMap) fmt.Println(c.root) for k, _ := range c.ChatIDMap { ch, ok := c.LoadChannelByID(k) fmt.Println(ch, ok) } t.Error(".") }