feat(destroy): implement destroy command parity
This commit is contained in:
@@ -168,7 +168,9 @@ type commitCmd struct {
|
||||
Castle string `arg:"" optional:"" name:"CASTLE" help:"Castle name."`
|
||||
}
|
||||
|
||||
type destroyCmd struct{}
|
||||
type destroyCmd struct {
|
||||
Castle string `arg:"" optional:"" name:"CASTLE" help:"Castle name."`
|
||||
}
|
||||
|
||||
type cdCmd struct{}
|
||||
|
||||
@@ -189,13 +191,13 @@ func (c *pushCmd) Run(app *core.App) error { return app.Push(defaultCastle(c.Cas
|
||||
func (c *commitCmd) Run(app *core.App) error {
|
||||
return app.Commit(defaultCastle(c.Castle), c.Message)
|
||||
}
|
||||
func (c *destroyCmd) Run() error { return notImplemented("destroy") }
|
||||
func (c *cdCmd) Run() error { return notImplemented("cd") }
|
||||
func (c *openCmd) Run() error { return notImplemented("open") }
|
||||
func (c *execCmd) Run() error { return notImplemented("exec") }
|
||||
func (c *execAllCmd) Run() error { return notImplemented("exec_all") }
|
||||
func (c *rcCmd) Run(app *core.App) error { return app.Rc(defaultCastle(c.Castle)) }
|
||||
func (c *generateCmd) Run() error { return notImplemented("generate") }
|
||||
func (c *destroyCmd) Run(app *core.App) error { return app.Destroy(defaultCastle(c.Castle)) }
|
||||
func (c *cdCmd) Run() error { return notImplemented("cd") }
|
||||
func (c *openCmd) Run() error { return notImplemented("open") }
|
||||
func (c *execCmd) Run() error { return notImplemented("exec") }
|
||||
func (c *execAllCmd) Run() error { return notImplemented("exec_all") }
|
||||
func (c *rcCmd) Run(app *core.App) error { return app.Rc(defaultCastle(c.Castle)) }
|
||||
func (c *generateCmd) Run() error { return notImplemented("generate") }
|
||||
|
||||
func defaultCastle(castle string) string {
|
||||
if strings.TrimSpace(castle) == "" {
|
||||
|
||||
Reference in New Issue
Block a user