code: func ReadVarString(r io.Reader, pver uint32) (string, error) {
  	count, err := ReadVarInt(r, pver)
  	if err != nil {
  		return "", err
  	}
  
  	// Prevent variable length strings that are larger than the maximum
  	// message size.  It would be possible to cause memory exhaustion and
  	// panics without a sane upper bound on this count.
  	if count > MaxMessagePayload {
  		str := fmt.Sprintf("variable length string is too long "+
  			"[count %d, max %d]", count, MaxMessagePayload)
  		return "", messageError("ReadVarString", str)
  	}
  
  	buf := make([]byte, count)
  	_, err = io.ReadFull(r, buf)
  	if err != nil {
  		return "", err
  	}
  	return string(buf), nil
  }
docs: // ReadVarString reads a variable length string from r and returns it as a Go
  // string.  A variable length string is encoded as a variable length integer
  // containing the length of the string followed by the bytes that represent the
  // string itself.  An error is returned if the length is greater than the
  // maximum block payload size since it helps protect against memory exhaustion
  // attacks and forced panics through malformed messages.