]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/boltdb.go
Use default bbolt package alias
[btrtrc.git] / storage / boltdb.go
index 015e3d90392f55de36a2c902cc4a4a4e31f7f3e4..f95d2a607f8ccddb63e708984563d6b15a1e1ea1 100644 (file)
@@ -6,19 +6,19 @@ import (
        "time"
 
        "github.com/anacrolix/missinggo/expect"
-       bolt "go.etcd.io/bbolt"
+       "go.etcd.io/bbolt"
 
        "github.com/anacrolix/torrent/metainfo"
 )
 
 const (
        // Chosen to match the usual chunk size in a torrent client. This way,
-       // most chunk writes are to exactly one full item in bolt DB.
+       // most chunk writes are to exactly one full item in bbolt DB.
        chunkSize = 1 << 14
 )
 
 type boltDBClient struct {
-       db *bolt.DB
+       db *bbolt.DB
 }
 
 type boltDBTorrent struct {
@@ -27,7 +27,7 @@ type boltDBTorrent struct {
 }
 
 func NewBoltDB(filePath string) ClientImplCloser {
-       db, err := bolt.Open(filepath.Join(filePath, "bolt.db"), 0600, &bolt.Options{
+       db, err := bbolt.Open(filepath.Join(filePath, "bolt.db"), 0600, &bbolt.Options{
                Timeout: time.Second,
        })
        expect.Nil(err)