code: func (b *BufReader) fill() {
  	// Slide existing data to beginning.
  	if b.r > 0 {
  		copy(b.buf, b.buf[b.r:b.w])
  		b.w -= b.r
  		b.r = 0
  	}
  
  	if b.w >= len(b.buf) {
  		panic("bufio: tried to fill full buffer")
  	}
  	if b.available == 0 {
  		b.err = io.EOF
  		return
  	}
  
  	// Read new data: try a limited number of times.
  	const maxConsecutiveEmptyReads = 100
  	for i := maxConsecutiveEmptyReads; i > 0; i-- {
  		n, err := b.rd.Read(b.buf[b.w:])
  		b.w += n
  		if err != nil {
  			b.err = err
  			return
  		}
  		if n > 0 {
  			return
  		}
  	}
  	b.err = io.ErrNoProgress
  }
docs: // fill reads a new chunk into the buffer.