]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/bolt.go
Add cove to downstream projects
[btrtrc.git] / storage / bolt.go
index 025c566524c89865c61dec7aa32567f006f0643f..945b24995db936df6b401f3eb546c36c2d2d14d2 100644 (file)
@@ -1,5 +1,5 @@
-//go:build !noboltdb
-// +build !noboltdb
+//go:build !noboltdb && !wasm
+// +build !noboltdb,!wasm
 
 package storage
 
@@ -30,7 +30,7 @@ type boltTorrent struct {
 }
 
 func NewBoltDB(filePath string) ClientImplCloser {
-       db, err := bbolt.Open(filepath.Join(filePath, "bolt.db"), 0600, &bbolt.Options{
+       db, err := bbolt.Open(filepath.Join(filePath, "bolt.db"), 0o600, &bbolt.Options{
                Timeout: time.Second,
        })
        expect.Nil(err)
@@ -42,7 +42,7 @@ func (me *boltClient) Close() error {
        return me.db.Close()
 }
 
-func (me *boltClient) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (TorrentImpl, error) {
+func (me *boltClient) OpenTorrent(_ *metainfo.Info, infoHash metainfo.Hash) (TorrentImpl, error) {
        t := &boltTorrent{me, infoHash}
        return TorrentImpl{
                Piece: t.Piece,