func splitRepositoryAndTag()

in pkg/userdata/bottlerocket/prepare.go [42:53]


func splitRepositoryAndTag(image string) (repository, tag string) {
	lastInd := strings.LastIndex(image, ":")
	if lastInd == -1 {
		return image, ""
	}

	if lastInd == len(image)-1 {
		return image[:lastInd], ""
	}

	return image[:lastInd], image[lastInd+1:]
}