code: func (r *ServerResponse) stopReading(reader *bufio.Reader) (bool, error) {
  	ahead, err := reader.Peek(7)
  	if err == io.EOF {
  		return true, nil
  	}
  
  	if err != nil {
  		return false, err
  	}
  
  	if len(ahead) > 4 && r.isValidCommand(ahead[0:3]) {
  		return false, nil
  	}
  
  	if len(ahead) == 7 && r.isValidCommand(ahead[4:]) {
  		return false, nil
  	}
  
  	return true, nil
  }
docs: // stopReading detects when a valid command such as ACK or NAK is found to be
  // read in the buffer without moving the read pointer.