]> Sergey Matveev's repositories - btrtrc.git/blob - tests/issue-798/main.go
Fix write error handling
[btrtrc.git] / tests / issue-798 / main.go
1 package main
2
3 import (
4         "fmt"
5         "github.com/anacrolix/torrent"
6 )
7
8 func main() {
9         config := torrent.NewDefaultClientConfig()
10         config.DataDir = "./output"
11         c, _ := torrent.NewClient(config)
12         defer c.Close()
13         t, _ := c.AddMagnet("magnet:?xt=urn:btih:99c82bb73505a3c0b453f9fa0e881d6e5a32a0c1&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce")
14         <-t.GotInfo()
15         fmt.Println("start downloading")
16         t.DownloadAll()
17         c.WaitAll()
18 }