From a646308a120f93819c920ff9ea72e518e1b69033 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 20 Mar 2015 10:51:06 +1100 Subject: [PATCH] Update the example --- client.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client.go b/client.go index 3cd9f624..b1e66ad7 100644 --- a/client.go +++ b/client.go @@ -3,14 +3,12 @@ Package torrent implements a torrent client. Simple example: - c := &Client{} - c.Start() - defer c.Stop() - if err := c.AddTorrent(externalMetaInfoPackageSux); err != nil { - return fmt.Errors("error adding torrent: %s", err) - } + c, _ := NewClient() + t, _, c.AddMagnet("magnet:?xt=urn:btih:ZOCMZQIPFFW7OLLMIC5HUB6BPCSDEOQU") + t.DownloadAll() c.WaitAll() log.Print("erhmahgerd, torrent downloaded") + c.Close() */ package torrent -- 2.48.1