func (c Crossref) Iterate(r io.Reader) (<-chan []span.Importer, error) { return span.FromLines(r, func(b []byte) (span.Importer, error) { doc := new(Document) err := json.Unmarshal(b, doc) if err != nil { log.Printf("%s", string(b)) } return doc, err }) }
func (s DOAJ) Iterate(r io.Reader) (<-chan []span.Importer, error) { return span.FromLines(r, func(b []byte) (span.Importer, error) { resp := new(Response) err := json.Unmarshal(b, resp) if err != nil { return resp.Source, err } resp.Source.Type = resp.Type return resp.Source, nil }) }