Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rkfg committed Dec 20, 2020
1 parent 66d9cba commit 12fedef
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions leveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 12fedef

Please sign in to comment.