func newCmd()

in pkg/cmd/asglifecycle/asglifecycle.go [52:66]


func newCmd() *cobra.Command {
	var cmd = &cobra.Command{
		Use:     "asglifecycle [--code CODE] [--state STATE] [--not-after] [--not-before-deadline]",
		Aliases: []string{"asglifecycle", "autoscaling", "asg"},
		PreRunE: preRun,
		Example: fmt.Sprintf("  %s asglifecycle -h \tasglifecycle help \n  %s asglifecycle -t target-lifecycle-state\t\tmocks asg lifecycle target lifecycle states", cmdutil.BinName, cmdutil.BinName),
		Run:     run,
		Short:   "Mock EC2 ASG Lifecycle target-lifecycle-state",
		Long:    "Mock EC2 ASG Lifecycle target-lifecycle-state",
	}

	// bind local flags to config
	cfg.BindFlagSetWithKeyPrefix(cmd.Flags(), cfgPrefix)
	return cmd
}