commit c1a5e4e6675efccc14eeda4587a66bad0748c4ef Author: lordwelch Date: Sat Jun 17 02:11:46 2017 -0700 Initial have struct for torrent metadata start struct for data I will use diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d13c17 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +TorrentFilter diff --git a/main.go b/main.go new file mode 100644 index 0000000..24dcac8 --- /dev/null +++ b/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("Hello world") +} diff --git a/type.go b/type.go new file mode 100644 index 0000000..f2360a5 --- /dev/null +++ b/type.go @@ -0,0 +1,26 @@ +package main + +import ( + "github.com/zeebo/bencode" +) + +type MetaTorrent struct { + Announce string `bencode:"announce"` + Announcelist [][]string `bencode:"announce-list"` + Comment string `bencode:"comment"` + CreatedBy string `bencode:"created by"` + Info struct { + Name string `bencode:"name"` + Piece_length int64 `bencode:"piece length"` + Pieces int64 `bencode:"pieces"` + Length int64 `bencode:"length"` + Files []struct { + Length int64 `bencode:"length"` + Path []string `bencode:"path"` + } `bencode:"files"` + } `bencode:"info"` +} + +type Torrent struct { + Name string +}