code: func (it *invDatastoreIter) next() (*Invocation, error) {
  	switch {
  	case it.results == nil:
  		panic("'next' is called before 'start'")
  	case it.stopped:
  		panic("'next' is called after 'stop'")
  	}
  	if inv, ok := <-it.results; ok {
  		return inv, nil
  	}
  	return nil, it.err // 'it.err' is valid only after the channel is closed
  }
docs: // next fetches the next query item if there's one.
  //
  // Returns (nil, nil) if all items has been successfully fetched. If the query
  // failed, returns (nil, err).