code: func (r *Reader) Read(p []byte) (n int, err error) {
  	if len(p) == 0 {
  		return 0, nil
  	}
  
  	if r.buf == nil {
  		if r.err != nil {
  			return 0, r.readErr()
  		}
  
  		return r.rd.Read(p)
  	}
  
  	// copy as much as we can
  	n = copy(p, r.buf)
  	r.buf = nilIfEmpty(r.buf[n:])
  	return n, nil
  }
docs: // Read is an implementation of io.Reader interface.
  // The bytes are taken from the underlying Reader, but it checks for BOMs, removing them as necessary.