Skip to content

Commit ae04486

Browse files
committed
x
1 parent b05b378 commit ae04486

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/boltdb_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package test
22

33
import (
4+
"bytes"
45
"fmt"
56
"testing"
67

@@ -60,7 +61,10 @@ func testopenfile() {
6061
})
6162
err = db.View(func(tx *bolt.Tx) error {
6263
if err := tx.ForEach(func(name []byte, b *bolt.Bucket) error {
63-
fmt.Println(string(name))
64+
65+
if bytes.HasPrefix(name, []byte("MyBucket")) {
66+
fmt.Println(string(name))
67+
}
6468
return nil
6569
}); err != nil {
6670
fmt.Println(err)

0 commit comments

Comments
 (0)