aboutsummaryrefslogtreecommitdiff
path: root/meta/torrent_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-07-13 12:31:49 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-07-13 12:31:49 +0200
commit06d15dc65aeac5f24c6b86fe0474760991f18856 (patch)
tree374f4b46c73d90b85ca47a72fa5225387d2954ef /meta/torrent_test.go
parent80bbf61339bb438e94f7389cc1dfcb5ee3325bc8 (diff)
Move Open back into meta package
Diffstat (limited to 'meta/torrent_test.go')
-rw-r--r--meta/torrent_test.go20
1 files changed, 1 insertions, 19 deletions
diff --git a/meta/torrent_test.go b/meta/torrent_test.go
index 75cccc9..c7c4ded 100644
--- a/meta/torrent_test.go
+++ b/meta/torrent_test.go
@@ -1,11 +1,6 @@
package meta
-import (
- "io/ioutil"
- "testing"
-
- "dim13.org/btget/bencode"
-)
+import "testing"
var tors = map[string]string{
"bsd": "OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent",
@@ -14,19 +9,6 @@ var tors = map[string]string{
"mul": "multi.torrent",
}
-func Open(fname string) (Torrent, error) {
- var tor Torrent
- body, err := ioutil.ReadFile(fname)
- if err != nil {
- return Torrent{}, err
- }
- err = bencode.Unmarshal(body, &tor)
- if err != nil {
- return Torrent{}, err
- }
- return tor, nil
-}
-
func TestPieces(t *testing.T) {
tor, err := Open("../examples/" + tors["mul"])
if err != nil {