code: func writePaddedString(str string, buf *bytes.Buffer) (int, error) {
  	// Write the string to the buffer
  	n, err := buf.WriteString(str)
  	if err != nil {
  		return 0, err
  	}
  
  	// Calculate the padding bytes needed and create a buffer for the padding bytes
  	numPadBytes := padBytesNeeded(len(str))
  	if numPadBytes > 0 {
  		padBytes := make([]byte, numPadBytes)
  		// Add the padding bytes to the buffer
  		n, err := buf.Write(padBytes)
  		if err != nil {
  			return 0, err
  		}
  		numPadBytes = n
  	}
  
  	return n + numPadBytes, nil
  }
docs: // writePaddedString writes a string with padding bytes to the a buffer.
  // Returns, the number of written bytes and an error if any.