@@ -20,8 +20,11 @@
Loading
20 20
	defer it.Close()
21 21
22 22
	for it.Rewind(); it.Valid(); it.Next() {
23 -
		var val interface{}
24 -
		key := it.Item().Key()
23 +
		var (
24 +
			val interface{}
25 +
			key = it.Item().Key()
26 +
		)
27 +
25 28
		if err := tx.Get(key, &val); err != nil {
26 29
			return badgerError(err)
27 30
		}
@@ -37,6 +40,7 @@
Loading
37 40
func (db *DB) cleanIndex() error {
38 41
	bq := bleve.NewMatchAllQuery()
39 42
	req := bleve.NewSearchRequest(bq)
43 +
40 44
	res, err := db.si.Search(req)
41 45
	if err != nil {
42 46
		return bleveError(err)

@@ -37,6 +37,7 @@
Loading
37 37
	}
38 38
39 39
	opts := DefaultOptions(dir)
40 +
40 41
	return OpenWith(opts)
41 42
}
42 43
@@ -66,6 +67,7 @@
Loading
66 67
	}
67 68
68 69
	db.opts = opts
70 +
69 71
	return db, nil
70 72
}
71 73
@@ -90,6 +92,7 @@
Loading
90 92
func openDB(opts badger.Options) (*badger.DB, error) {
91 93
	opts.Logger = &bl{}
92 94
	opts.Compression = options.Snappy
95 +
93 96
	return badger.Open(opts)
94 97
}
95 98

@@ -10,7 +10,6 @@
Loading
10 10
	"github.com/dgraph-io/badger/v2"
11 11
)
12 12
13 -
// Errors
14 13
var (
15 14
	ErrKeyNotFound = badgerError(badger.ErrKeyNotFound)
16 15
)

@@ -75,6 +75,7 @@
Loading
75 75
	}
76 76
77 77
	tx.operations[string(key)] = nil
78 +
78 79
	return nil
79 80
}
80 81
@@ -155,5 +156,6 @@
Loading
155 156
	}
156 157
157 158
	tx.operations[string(key)] = val
159 +
158 160
	return nil
159 161
}
Files Coverage
pkg/sdb 77.38%
Project Totals (5 files) 77.38%
36.4
TRAVIS_OS_NAME=linux
1.13=.13

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading