6 "github.com/davecgh/go-spew/spew"
8 "github.com/anacrolix/torrent"
9 "github.com/anacrolix/torrent/tracker"
12 type AnnounceCmd struct {
13 Tracker string `arg:"positional"`
14 InfoHash torrent.InfoHash
17 func announceErr(flags AnnounceCmd) error {
18 response, err := tracker.Announce{
19 TrackerUrl: flags.Tracker,
20 Request: tracker.AnnounceRequest{
21 InfoHash: flags.InfoHash,
22 Port: uint16(torrent.NewDefaultClientConfig().ListenPort),
26 return fmt.Errorf("doing announce: %w", err)