Minor update

This commit is contained in:
obscuren
2014-01-08 23:43:20 +01:00
parent 9f42835a02
commit 92b6667bd1
7 changed files with 126 additions and 44 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"fmt"
)
/*
@ -23,3 +24,11 @@ func (db *MemDatabase) Put(key []byte, value []byte) {
func (db *MemDatabase) Get(key []byte) ([]byte, error) {
return db.db[string(key)], nil
}
func (db *MemDatabase) Print() {
for key, val := range db.db {
fmt.Printf("%x(%d):", key, len(key))
decoded := DecodeNode(val)
PrintSlice(decoded)
}
}