Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 824 Bytes

README.md

File metadata and controls

53 lines (40 loc) · 824 Bytes

nzb.go

Little helper package for reading NZB files in Go (golang)

Install

goinstall github.com/chrisfarms/nzb

Godoc

type Nzb struct {
    Meta  map[string]string
    Files []NzbFile
}
func New(buf io.Reader) (*Nzb, os.Error)
func NewString(data string) (*Nzb, os.Error)
type NzbFile struct {
    Groups   []string     `xml:"groups>group"`
    Segments []NzbSegment `xml:"segments>segment"`
    Poster   string       `xml:"attr"`
    Date     int          `xml:"attr"`
    Subject  string       `xml:"attr"`
    Part     int
}
type NzbSegment struct {
    XMLName xml.Name `xml:"segment"`
    Bytes   int      `xml:"attr"`
    Number  int      `xml:"attr"`
    Id      string   `xml:"innerxml"`
}