func removeTag()

in pkg/docker.go [128:141]


func removeTag(tagOps []TagOp, dcli *client.Client, tagSuffix string, repoTag string) ([]TagOp, error) {
	imageName, tag, err := GetImageAndTag(repoTag)
	if err != nil {
		return tagOps, err
	}
	var newTag string = strings.TrimSuffix(tag, "-"+tagSuffix)
	var newRepoTag string = imageName + ":" + newTag
	if newRepoTag == repoTag {
		fmt.Printf("skipping %v (suffix '-%v' not found)\n", repoTag, tagSuffix)
		return tagOps, nil
	}
	tagOps = append(tagOps, TagOp{repoTag, newRepoTag})
	return tagOps, nil
}