Fix some go vet warnings

This commit is contained in:
Matt Joiner 2021-02-03 19:42:46 +11:00
parent 371d54ab76
commit c714cb6992
3 changed files with 6 additions and 5 deletions

View File

@ -28,12 +28,12 @@ func mainErr() error {
Address string `arg:"positional"`
SecretKey string `arg:"positional"`
InitialPayload []byte
} `arg:"subcommand""`
} `arg:"subcommand"`
Listen *struct {
Network string `arg:"positional"`
Address string `arg:"positional"`
SecretKeys []string `arg:"positional"`
} `arg:"subcommand""`
} `arg:"subcommand"`
}{
CryptoMethod: mse.AllSupportedCrypto,
}

View File

@ -119,12 +119,12 @@ func (me *diskFullStorage) Piece(p metainfo.Piece) storage.PieceImpl {
}
}
func (me diskFullStorage) Close() error {
func (me *diskFullStorage) Close() error {
return nil
}
func (d diskFullStorage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (storage.TorrentImpl, error) {
return &d, nil
func (d *diskFullStorage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (storage.TorrentImpl, error) {
return d, nil
}
type pieceImpl struct {

View File

@ -186,6 +186,7 @@ func TestAnnounceRandomInfoHashThirdParty(t *testing.T) {
}(url)
}
wg.Wait()
cancel()
}
// Check that URLPath option is done correctly.