// Delete deletes the project (the `project` resource if supported, or directly the `namespace`)
// with the name projectName and returns an error if any
Delete deletes the project (the `project` resource if supported, or directly the `namespace`)
with the name projectName and returns an error if any
// Delete deletes the project ( the ` project ` resource if supported or directly the ` namespace ` ) // with the name projectName and returns an error if any
func Delete(context *genericclioptions.Context, projectName string, wait bool) error {
	if projectName == "" {
		return errors.Errorf("no project name given")
	}
	projectSupport, err := context.Client.IsProjectSupported()
	if err != nil {
		return errors.Wrap(err, "unable to detect project support")
	}
	if projectSupport {
		err := context.Client.DeleteProject(projectName, wait)
		if err != nil {
			return errors.Wrapf(err, "unable to delete project %s", projectName)
		}
	} else {
		err := context.KClient.DeleteNamespace(projectName, wait)
		if err != nil {
			return errors.Wrapf(err, "unable to delete namespace %s", projectName)
		}
	}
	return nil
}
func Delete ( context * genericclioptions . Context , projectName string , wait bool ) error { if projectName == " " { return errors . Errorf ( " " ) } projectSupport , err := context . Client . IsProjectSupported ( ) if err != nil { return errors . Wrap ( err , " " ) } if projectSupport { err := context . Client . DeleteProject ( projectName , wait ) if err != nil { return errors . Wrapf ( err , " " , projectName ) } } else { err := context . KClient . DeleteNamespace ( projectName , wait ) if err != nil { return errors . Wrapf ( err , " " , projectName ) } } return nil }
Delete deletes the project (the `project` resource if supported, or directly the `namespace`)
with the name projectName and returns an error if any
Delete deletes the project ( the ` project ` resource if supported or directly the ` namespace ` ) with the name projectName and returns an error if any
// Delete the requested project