func generateRandomID()

in reference-architectures/cloud_deploy_flow/CloudFunctions/createRelease/main.go [148:157]


func generateRandomID(length int) (string, error) {
	// Create a byte slice of specified length
	bytes := make([]byte, length)
	// Fill the byte slice with random data
	if _, err := rand.Read(bytes); err != nil {
		return "", err
	}
	// Return the hexadecimal representation of random bytes
	return hex.EncodeToString(bytes), nil
}