Пример #1
0
func main() {
	var dbDir string
	if len(os.Args) < 2 {
		fmt.Println("Usage: <leveldb path>")
		os.Exit(1)
	}
	dbDir = os.Args[1]
	settings := leveldb.DefaultSettings()
	settings.Set("symflux.recon.leveldb.path", dbDir)
	ptree, err := leveldb.New(settings)
	if err != nil {
		die(err)
	}
	err = ptree.Create()
	if err != nil {
		die(err)
	}
	walk(ptree)
}
Пример #2
0
func NewSksPTree(reconSettings *recon.Settings) (recon.PrefixTree, error) {
	treeSettings := leveldb.NewSettings(reconSettings)
	return leveldb.New(treeSettings)
}