func RemoveManifestDescriptorFromIndex(img string, refName string) error {
	if refName == "" {
		return errors.New("empty refName specified")
	}
	src, err := ReadIndex(img)
	if err != nil {
		return err
	}
	dst := *src
	dst.Manifests = nil
	for _, m := range src.Manifests {
		mRefName, ok := m.Annotations[RefNameAnnotation]
		if ok && mRefName == refName {
			continue
		}
		dst.Manifests = append(dst.Manifests, m)
	}
	return WriteIndex(img, &dst)
}
// RemoveManifestDescriptorFromIndex removes the manifest descriptor from the index.
// Returns nil error when the entry not found.
RemoveManifestDescriptorFromIndex removes the manifest descriptor from the index.
Returns nil error when the entry not found.
// RemoveManifestDescriptorFromIndex removes the manifest descriptor from the index . // Returns nil error when the entry not found .
func RemoveManifestDescriptorFromIndex(img string, refName string) error {
	if refName == "" {
		return errors.New("empty refName specified")
	}
	src, err := ReadIndex(img)
	if err != nil {
		return err
	}
	dst := *src
	dst.Manifests = nil
	for _, m := range src.Manifests {
		mRefName, ok := m.Annotations[RefNameAnnotation]
		if ok && mRefName == refName {
			continue
		}
		dst.Manifests = append(dst.Manifests, m)
	}
	return WriteIndex(img, &dst)
}
func RemoveManifestDescriptorFromIndex ( img string , refName string ) error { if refName == " " { return errors . New ( " " ) } src , err := ReadIndex ( img ) if err != nil { return err } dst := * src dst . Manifests = nil for _ , m := range src . Manifests { mRefName , ok := m . Annotations [ RefNameAnnotation ] if ok && mRefName == refName { continue } dst . Manifests = append ( dst . Manifests , m ) } return WriteIndex ( img , & dst ) }
RemoveManifestDescriptorFromIndex removes the manifest descriptor from the index.
RemoveManifestDescriptorFromIndex removes the manifest descriptor from the index .