aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bolt/check.go')
-rw-r--r--cmd/bolt/check.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/bolt/check.go b/cmd/bolt/check.go
index ec2ea69..1436aba 100644
--- a/cmd/bolt/check.go
+++ b/cmd/bolt/check.go
@@ -21,7 +21,12 @@ func Check(path string) {
defer db.Close()
// Perform consistency check.
- if err := db.Check(); err != nil {
+ err = db.View(func(tx *bolt.Tx) error {
+ return tx.Check()
+ })
+
+ // Print out any errors that occur.
+ if err != nil {
if errors, ok := err.(bolt.ErrorList); ok {
for _, err := range errors {
println(err)