// NewAddonDisableCommand create addon disable command
NewAddonDisableCommand create addon disable command
// NewAddonDisableCommand create addon disable command
func NewAddonDisableCommand(ioStream cmdutil.IOStreams) *cobra.Command {
	return &cobra.Command{
		Use:     "disable",
		Short:   "disable an addon",
		Long:    "disable an addon in cluster",
		Example: "vela addon disable <addon-name>",
		RunE: func(cmd *cobra.Command, args []string) error {
			if len(args) < 1 {
				_, err := ioStream.Out.Write([]byte("Must specify addon name"))
				if err != nil {
					return err
				}
			}
			name := args[0]
			err := disableAddon(name)
			if err != nil {
				return err
			}
			return nil
		},
	}
}
func NewAddonDisableCommand ( ioStream cmdutil . IOStreams ) * cobra . Command { return & cobra . Command { Use : " " , Short : " " , Long : " " , Example : " " , RunE : func ( cmd * cobra . Command , args [ ] string ) error { if len ( args ) < 1 { _ , err := ioStream . Out . Write ( [ ] byte ( " " ) ) if err != nil { return err } } name := args [ 0 ] err := disableAddon ( name ) if err != nil { return err } return nil } , } }
NewAddonDisableCommand create addon disable command
NewAddonDisableCommand create addon disable command