func ParseCronJobForJob(name string) string {
	lastDash := strings.LastIndexAny(name, "-")
	if lastDash == -1 {
		// No dash
		return ""
	}
	suffix := name[lastDash+1:]
	if len(suffix) < 3 {
		// Suffix is variable length but we cutoff at 3+ characters
		return ""
	}

	if !utils.StringInRuneset(suffix, Digits) {
		// Invalid suffix
		return ""
	}

	return name[:lastDash]
}
// ParseCronJobForJob gets the cronjob name from a job,
// or returns an empty string if no parent cronjob is found.
// https://github.com/kubernetes/kubernetes/blob/b4e3bd381bd4d7c0db1959341b39558b45187345/pkg/controller/cronjob/utils.go#L156
ParseCronJobForJob gets the cronjob name from a job,
or returns an empty string if no parent cronjob is found.
// ParseCronJobForJob gets the cronjob name from a job // or returns an empty string if no parent cronjob is found . // https : // github . com / kubernetes / kubernetes / blob / b4e3bd381bd4d7c0db1959341b39558b45187345 / pkg / controller / cronjob / utils . go#L156
func ParseCronJobForJob(name string) string {
	lastDash := strings.LastIndexAny(name, "-")
	if lastDash == -1 {
		return ""
	}
	suffix := name[lastDash+1:]
	if len(suffix) < 3 {
		return ""
	}
	if !utils.StringInRuneset(suffix, Digits) {
		return ""
	}
	return name[:lastDash]
}
func ParseCronJobForJob ( name string ) string { lastDash := strings . LastIndexAny ( name , " " ) if lastDash == - 1 { return " " } suffix := name [ lastDash + 1 : ] if len ( suffix ) < 3 { return " " } if ! utils . StringInRuneset ( suffix , Digits ) { return " " } return name [ : lastDash ] }
ParseCronJobForJob gets the cronjob name from a job,
or returns an empty string if no parent cronjob is found.
ParseCronJobForJob gets the cronjob name from a job or returns an empty string if no parent cronjob is found .
// No dash // Suffix is variable length but we cutoff at 3+ characters // Invalid suffix