have struct for torrent metadata
start struct for data I will use
This commit is contained in:
lordwelch 2017-06-17 02:11:46 -07:00
commit c1a5e4e667
3 changed files with 36 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
TorrentFilter

9
main.go Normal file
View File

@ -0,0 +1,9 @@
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello world")
}

26
type.go Normal file
View File

@ -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
}