func (a *API) DeleteCheckBundleByCID(cid CIDType) (bool, error) {

	if cid == nil || *cid == "" {
		return false, fmt.Errorf("Invalid check bundle CID [none]")
	}

	bundleCID := string(*cid)

	matched, err := regexp.MatchString(config.CheckBundleCIDRegex, bundleCID)
	if err != nil {
		return false, err
	}
	if !matched {
		return false, fmt.Errorf("Invalid check bundle CID [%v]", bundleCID)
	}

	_, err = a.Delete(bundleCID)
	if err != nil {
		return false, err
	}

	return true, nil
}
func (a *API) DeleteCheckBundleByCID(cid CIDType) (bool, error) {

	if cid == nil || *cid == "" {
		return false, fmt.Errorf("Invalid check bundle CID [none]")
	}

	bundleCID := string(*cid)

	matched, err := regexp.MatchString(config.CheckBundleCIDRegex, bundleCID)
	if err != nil {
		return false, err
	}
	if !matched {
		return false, fmt.Errorf("Invalid check bundle CID [%v]", bundleCID)
	}

	_, err = a.Delete(bundleCID)
	if err != nil {
		return false, err
	}

	return true, nil
}
func ( a * API ) DeleteCheckBundleByCID ( cid CIDType ) ( bool , error ) { if cid == nil || * cid == " " { return false , fmt . Errorf ( " " ) } bundleCID := string ( * cid ) matched , err := regexp . MatchString ( config . CheckBundleCIDRegex , bundleCID ) if err != nil { return false , err } if ! matched { return false , fmt . Errorf ( " " , bundleCID ) } _ , err = a . Delete ( bundleCID ) if err != nil { return false , err } return true , nil }
// DeleteCheckBundleByCID deletes check bundle with passed cid.
DeleteCheckBundleByCID deletes check bundle with passed cid .