leveldb: Snapshot: add stringer
diff --git a/leveldb/db_snapshot.go b/leveldb/db_snapshot.go
index e41dcc6..0372848 100644
--- a/leveldb/db_snapshot.go
+++ b/leveldb/db_snapshot.go
@@ -8,6 +8,7 @@
import (
"container/list"
+ "fmt"
"runtime"
"sync"
"sync/atomic"
@@ -89,6 +90,10 @@
return snap
}
+func (snap *Snapshot) String() string {
+ return fmt.Sprintf("leveldb.Snapshot{%d}", snap.elem.seq)
+}
+
// Get gets the value for the given key. It returns ErrNotFound if
// the DB does not contains the key.
//