Initial
have struct for torrent metadata start struct for data I will use
This commit is contained in:
commit
c1a5e4e667
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
TorrentFilter
|
9
main.go
Normal file
9
main.go
Normal file
@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello world")
|
||||
}
|
26
type.go
Normal file
26
type.go
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user