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()
20 Dec 2017, by
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()