diff --git a/leveldb.go b/leveldb.go index 501a2a8..ceb1ef5 100644 --- a/leveldb.go +++ b/leveldb.go @@ -7,7 +7,6 @@ import ( "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" - "github.com/syndtr/goleveldb/leveldb/util" ) const pathSeparator = "\x00" @@ -50,23 +49,6 @@ func pathKey(path string, key string) []byte { return []byte(path + pathSeparator + key) } -func findFirstString(path string, prefix string) (result string, err error) { - iter := ldb.NewIterator(util.BytesPrefix(pathKey(path, prefix)), nil) - defer iter.Release() - if ok := iter.Next(); ok { - return string(iter.Value()), nil - } - return "", leveldb.ErrNotFound -} - -func getUInt32(path string, key string) (uint32, error) { - val, err := ldb.Get(pathKey(path, key), nil) - if err != nil { - return 0, err - } - return uint32FromBytes(val), nil -} - func deleteString(tx *leveldb.Transaction, path string, key string) error { return tx.Delete(pathKey(path, key), nil) }