code: func readPaddedString(reader *bufio.Reader) (string, int, error) {
  	// Read the string from the reader
  	str, err := reader.ReadString(0)
  	if err != nil {
  		return "", 0, err
  	}
  	n := len(str)
  
  	// Remove the string delimiter, in order to calculate the right amount
  	// of padding bytes
  	str = str[:len(str)-1]
  
  	// Remove the padding bytes
  	padLen := padBytesNeeded(len(str)) - 1
  	if padLen > 0 {
  		n += padLen
  		padBytes := make([]byte, padLen)
  		if _, err = reader.Read(padBytes); err != nil {
  			return "", 0, err
  		}
  	}
  
  	return str, n, nil
  }
docs: // readPaddedString reads a padded string from the given reader. The padding
  // bytes are removed from the reader.