code: func (parser *Parser) getPages(rawPages <-chan []byte, pages chan<- *Page) {
  	for {
  		select {
  		case rawPage, ok := <-rawPages:
  			if !ok {
  				close(pages)
  				return
  			}
  
  			page, err := NewPageFromXML(rawPage)
  
  			if err == nil {
  				pages <- page
  			}
  		}
  	}
  }
docs: // GetPages parses a complete XML page into a page object.