LevelDB

20 Dec 2017, by

go语言使用leveldb

db, err := leveldb.OpenFile("./db", nil)
err = db.Put([]byte("key"), []byte("value"), nil)
data, err := db.Get([]byte("key"), nil)
fmt.Println(data, err)
defer db.Close()