func allocNameToIndex(name string) uint {
	matches := allocationIndexRegex.FindStringSubmatch(name)
	if len(matches) != 2 {
		return 0
	}

	index, err := strconv.Atoi(matches[1])
	if err != nil {
		return 0
	}

	return uint(index)
}
// allocNameToIndex returns the index of the allocation.
allocNameToIndex returns the index of the allocation.
// allocNameToIndex returns the index of the allocation .
func allocNameToIndex(name string) uint {
	matches := allocationIndexRegex.FindStringSubmatch(name)
	if len(matches) != 2 {
		return 0
	}
	index, err := strconv.Atoi(matches[1])
	if err != nil {
		return 0
	}
	return uint(index)
}
func allocNameToIndex ( name string ) uint { matches := allocationIndexRegex . FindStringSubmatch ( name ) if len ( matches ) != 2 { return 0 } index , err := strconv . Atoi ( matches [ 1 ] ) if err != nil { return 0 } return uint ( index ) }
allocNameToIndex returns the index of the allocation.
allocNameToIndex returns the index of the allocation .