// NewCmdUnlink implements the link odo command
NewCmdUnlink implements the link odo command
// NewCmdUnlink implements the link odo command
func NewCmdUnlink(name, fullName string) *cobra.Command {
	o := NewUnlinkOptions()
	unlinkCmd := &cobra.Command{
		Use:         fmt.Sprintf("%s <service> --component [component] OR %s <component> --component [component]", name, name),
		Short:       "Unlink component to a service or component",
		Long:        unlinkLongDesc,
		Example:     fmt.Sprintf(unlinkExample, fullName),
		Args:        cobra.ExactArgs(1),
		Annotations: map[string]string{"command": "component"},
		Run: func(cmd *cobra.Command, args []string) {
			genericclioptions.GenericRun(o, cmd, args)
		},
	}
	unlinkCmd.PersistentFlags().StringVar(&o.port, "port", "", "Port of the backend to which to unlink")
	unlinkCmd.PersistentFlags().BoolVarP(&o.wait, "wait", "w", false, "If enabled the link will return only when the component is fully running after the link is deleted")
	unlinkCmd.SetUsageTemplate(util.CmdUsageTemplate)
	projectCmd.AddProjectFlag(unlinkCmd)
	appCmd.AddApplicationFlag(unlinkCmd)
	AddComponentFlag(unlinkCmd)
	genericclioptions.AddContextFlag(unlinkCmd, &o.componentContext)
	completion.RegisterCommandHandler(unlinkCmd, completion.UnlinkCompletionHandler)
	return unlinkCmd
}
func NewCmdUnlink ( name , fullName string ) * cobra . Command { o := NewUnlinkOptions ( ) unlinkCmd := & cobra . Command { Use : fmt . Sprintf ( " " , name , name ) , Short : " " , Long : unlinkLongDesc , Example : fmt . Sprintf ( unlinkExample , fullName ) , Args : cobra . ExactArgs ( 1 ) , Annotations : map [ string ] string { " " : " " } , Run : func ( cmd * cobra . Command , args [ ] string ) { genericclioptions . GenericRun ( o , cmd , args ) } , } unlinkCmd . PersistentFlags ( ) . StringVar ( & o . port , " " , " " , " " ) unlinkCmd . PersistentFlags ( ) . BoolVarP ( & o . wait , " " , " " , false , " " ) unlinkCmd . SetUsageTemplate ( util . CmdUsageTemplate ) projectCmd . AddProjectFlag ( unlinkCmd ) appCmd . AddApplicationFlag ( unlinkCmd ) AddComponentFlag ( unlinkCmd ) genericclioptions . AddContextFlag ( unlinkCmd , & o . componentContext ) completion . RegisterCommandHandler ( unlinkCmd , completion . UnlinkCompletionHandler ) return unlinkCmd }
NewCmdUnlink implements the link odo command
NewCmdUnlink implements the link odo command
//Adding `--project` flag //Adding `--application` flag //Adding `--component` flag // Adding context flag