code: func (p *punctuatedReader) ReadUntilPunctuation(lim int) (res []byte, err error) {
  	for {
  		var n int
  		n, err = p.Read(p.buf[:])
  		if err == ErrPunctuated || err == nil {
  			res = append(res, p.buf[0:n]...)
  			if err == ErrPunctuated {
  				err = nil
  				return res, err
  			}
  			if len(res) >= lim {
  				return nil, ErrOverflow
  			}
  		} else if err != nil {
  			if err == io.EOF {
  				err = io.ErrUnexpectedEOF
  			}
  			return nil, err
  		} else if n == 0 {
  			return nil, io.ErrUnexpectedEOF
  		}
  	}
  }
docs: // ReadUntilPunctuation reads from the stream until it find a desired
  // punctuation byte. If it wasn't found before EOF, it will return io.ErrUnexpectedEOF.
  // If it wasn't found before lim bytes are consumed, then it will return ErrOverflow.