code: func (s *streamImpl) noMoreDataLocked() bool {
  	if !s.closed {
  		return false
  	}
  
  	// If we have an append error, we will no longer accept or consume data.
  	if s.appendErr != nil {
  		return true
  	}
  
  	var bufSize int64
  	s.withParserLock(func() error {
  		bufSize = s.c.parser.bufferedBytes()
  		return nil
  	})
  	return bufSize == 0
  }
docs: // noMoreDataLocked returns true if our stream has been closed and its buffer
  // is empty.
  //
  // The stream's stateLock must be held when calling this method.