package rutrackerer import ( "crypto/sha1" "encoding/hex" "strconv" "strings" "time" ) type Torrent struct { Offset int64 Id int64 Size int64 Title string Hash [sha1.Size]byte Registered time.Time } func (t *Torrent) CSV() string { return strings.Join([]string{ strconv.FormatInt(t.Offset, 10), strconv.FormatInt(t.Id, 10), strconv.FormatInt(t.Size, 10), hex.EncodeToString(t.Hash[:]), t.Registered.Format("2006-01-02T15:04:05"), t.Title, }, "\t") }