johnsonjh/jleveldb

View on GitHub
leveldb/batch.go

Summary

Maintainability
A
1 hr
Test Coverage

Function decodeBatchToMem has 6 return statements (exceeds 4 allowed).
Open

func decodeBatchToMem(data []byte, expectSeq uint64, mdb *memdb.DB) (seq uint64, batchLen int, err error) {
    seq, batchLen, err = decodeBatchHeader(data)
    if err != nil {
        return 0, 0, err
    }
Severity: Major
Found in leveldb/batch.go - About 40 mins to fix

    Function decodeBatch has 5 return statements (exceeds 4 allowed).
    Open

    func decodeBatch(data []byte, fn func(i int, index batchIndex) error) error {
        var index batchIndex
        for i, o := 0, 0; o < len(data); i++ {
            // Key type.
            index.keyType = keyType(data[o])
    Severity: Major
    Found in leveldb/batch.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status