func (a *API) DeleteWorksheetByCID(cid CIDType) (bool, error) {
	if cid == nil || *cid == "" {
		return false, fmt.Errorf("Invalid worksheet CID [none]")
	}

	worksheetCID := string(*cid)

	matched, err := regexp.MatchString(config.WorksheetCIDRegex, worksheetCID)
	if err != nil {
		return false, err
	}
	if !matched {
		return false, fmt.Errorf("Invalid worksheet CID [%s]", worksheetCID)
	}

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

	return true, nil
}
func (a *API) DeleteWorksheetByCID(cid CIDType) (bool, error) {
	if cid == nil || *cid == "" {
		return false, fmt.Errorf("Invalid worksheet CID [none]")
	}

	worksheetCID := string(*cid)

	matched, err := regexp.MatchString(config.WorksheetCIDRegex, worksheetCID)
	if err != nil {
		return false, err
	}
	if !matched {
		return false, fmt.Errorf("Invalid worksheet CID [%s]", worksheetCID)
	}

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

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