(minor) Merge commits 7a4c2ee..77b3bf9 from https://github.com/jzelinskie/chihaya

This commit is contained in:
Lawrence, Rendall
2022-04-16 21:22:41 +03:00
parent 01064fd21a
commit 7716aa828a
2 changed files with 12 additions and 12 deletions
+2 -3
View File
@@ -9,7 +9,6 @@ import (
"time"
"github.com/anacrolix/torrent/tracker"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/sot-tech/mochi/bittorrent"
@@ -97,7 +96,7 @@ func testWithInfohash(infoHash bittorrent.InfoHash, url string, delay time.Durat
UserAgent: "mochi-e2e",
}.Do()
if err != nil {
return errors.Wrap(err, "announce failed")
return fmt.Errorf("announce failed: %w", err)
}
if len(resp.Peers) != 1 {
@@ -125,7 +124,7 @@ func testWithInfohash(infoHash bittorrent.InfoHash, url string, delay time.Durat
UserAgent: "mochi-e2e",
}.Do()
if err != nil {
return errors.Wrap(err, "announce failed")
return fmt.Errorf("announce failed: %w", err)
}
if len(resp.Peers) != 1 {