serviceaccess/serviceaccess.go
func (m *Manager) RemoveUnknownVisibilites(serviceInfo *ServiceInfo) error {
	for servicePlanName, servicePlan := range serviceInfo.AllPlans() {
		for _, plan := range servicePlan {
			for _, visibility := range plan.ListVisibilities() {
				if m.Peek {
					lo.G.Infof("[dry-run]: removing plan %s for service %s to org with guid %s", plan.Name, servicePlanName, visibility.OrganizationGuid)
					continue
				}
				lo.G.Infof("removing plan %s for service %s to org with guid %s", plan.Name, servicePlanName, visibility.OrganizationGuid)
				err := m.Client.DeleteServicePlanVisibilityByPlanAndOrg(visibility.ServicePlanGuid, visibility.OrganizationGuid, false)
				if err != nil {
					return err
				}
			}
		}
	}
	return nil
}
func (m *Manager) RemoveUnknownVisibilites(serviceInfo *ServiceInfo) error {
	for servicePlanName, servicePlan := range serviceInfo.AllPlans() {
		for _, plan := range servicePlan {
			for _, visibility := range plan.ListVisibilities() {
				if m.Peek {
					lo.G.Infof("[dry-run]: removing plan %s for service %s to org with guid %s", plan.Name, servicePlanName, visibility.OrganizationGuid)
					continue
				}
				lo.G.Infof("removing plan %s for service %s to org with guid %s", plan.Name, servicePlanName, visibility.OrganizationGuid)
				err := m.Client.DeleteServicePlanVisibilityByPlanAndOrg(visibility.ServicePlanGuid, visibility.OrganizationGuid, false)
				if err != nil {
					return err
				}
			}
		}
	}
	return nil
}
//RemoveUnknownVisibilites - will remove any service plan visiblities that are not known by cf-mgmt