code: func searchReader(r io.Reader, b byte) (idx int64, err error) {
  	buf := make([]byte, 1000)
  	idx = 0
  	var n int
  	for err == nil {
  		n, err = r.Read(buf)
  		for i := 0; i < n; i++ {
  			if buf[i] == b {
  				idx += int64(i) + 1
  				return idx, nil
  			}
  		}
  		idx += int64(n)
  	}
  	if err == io.EOF {
  		return idx, io.EOF
  	}
  	return 0, err
  }
docs: // searchReader returns the number of bytes until byte b or io.EOF is
  // encountered in Reader r. It is not idempotent and is not guaranteed to leave
  // the reader in any particular state. The returned error will be io.EOF, only
  // if EOF was encountered idx bytes into the Reader.