From a101ebb07e3486c2203ee9deb9e376b55085efc8 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 12 Apr 2018 11:34:24 +1000 Subject: [PATCH] package assert->expect --- internal/testutil/spec.go | 6 +++--- storage/boltdb.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/testutil/spec.go b/internal/testutil/spec.go index 63c909a4..b2daa48b 100644 --- a/internal/testutil/spec.go +++ b/internal/testutil/spec.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "strings" - "github.com/anacrolix/missinggo/assert" + "github.com/anacrolix/missinggo/expect" "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/metainfo" @@ -48,7 +48,7 @@ func (t *Torrent) Info(pieceLength int64) metainfo.Info { err := info.GeneratePieces(func(fi metainfo.FileInfo) (io.ReadCloser, error) { return ioutil.NopCloser(strings.NewReader(t.GetFile(strings.Join(fi.Path, "/")).Data)), nil }) - assert.Nil(err) + expect.Nil(err) return info } @@ -56,6 +56,6 @@ func (t *Torrent) Metainfo(pieceLength int64) *metainfo.MetaInfo { mi := metainfo.MetaInfo{} var err error mi.InfoBytes, err = bencode.Marshal(t.Info(pieceLength)) - assert.Nil(err) + expect.Nil(err) return &mi } diff --git a/storage/boltdb.go b/storage/boltdb.go index 6586ff0e..56c711ff 100644 --- a/storage/boltdb.go +++ b/storage/boltdb.go @@ -5,7 +5,7 @@ import ( "path/filepath" "time" - "github.com/anacrolix/missinggo/assert" + "github.com/anacrolix/missinggo/expect" "github.com/boltdb/bolt" "github.com/anacrolix/torrent/metainfo" @@ -30,7 +30,7 @@ func NewBoltDB(filePath string) ClientImpl { db, err := bolt.Open(filepath.Join(filePath, "bolt.db"), 0600, &bolt.Options{ Timeout: time.Second, }) - assert.Nil(err) + expect.Nil(err) db.NoSync = true return &boltDBClient{db} }