code: func CloudFormationResourceName(prefix string, parts ...string) string {
  	hash := sha1.New()
  	_, writeErr := hash.Write([]byte(prefix))
  	//lint:ignore SA9003 because it's TODO
  	if writeErr != nil {
  	}
  	if len(parts) <= 0 {
  		randValue := rand.Int63()
  		_, writeErr = hash.Write([]byte(strconv.FormatInt(randValue, 10)))
  		//lint:ignore SA9003 because it's TODO
  		if writeErr != nil {
  		}
  	} else {
  		for _, eachPart := range parts {
  			_, writeErr = hash.Write([]byte(eachPart))
  			//lint:ignore SA9003 because it's TODO
  			if writeErr != nil {
  			}
  		}
  	}
  	resourceName := fmt.Sprintf("%s%s", prefix, hex.EncodeToString(hash.Sum(nil)))
  
  	// Ensure that any non alphanumeric characters are replaced with ""
  	return reCloudFormationInvalidChars.ReplaceAllString(resourceName, "x")
  }
docs: // CloudFormationResourceName returns a name suitable as a logical
  // CloudFormation resource value.  See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
  // for more information.  The `prefix` value should provide a hint as to the
  // resource type (eg, `SNSConfigurator`, `ImageTranscoder`).  Note that the returned
  // name is not content-addressable.