From ca2de22de88bea55722827bfec53c116fdacfec8 Mon Sep 17 00:00:00 2001 From: NoamSDahan Date: Wed, 16 Aug 2023 17:34:29 +0300 Subject: [PATCH] - change flag from "state" to "status" after discussion --- cmd/commands/common/command.go | 6 +++--- cmd/commands/describe.go | 2 +- cmd/commands/destroy.go | 2 +- cmd/commands/list.go | 2 +- cmd/commands/provision.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/commands/common/command.go b/cmd/commands/common/command.go index e7216a9..3d7ba6a 100644 --- a/cmd/commands/common/command.go +++ b/cmd/commands/common/command.go @@ -18,7 +18,7 @@ func CommandBefore(c *cli.Context) error { return err } } - if state := c.String("state"); state != "" { + if state := c.String("status"); state != "" { if _, err := cnappgoat.StateFromString(state); err != nil { return err } @@ -75,8 +75,8 @@ func CommandFlags() []cli.Flag { Aliases: []string{"p"}, }, &cli.StringFlag{ - Name: "state", - Usage: "CNAPPgoat state to filter on, e.g. 'Deployed', 'Destroyed', 'Error', 'Not Deployed'", + Name: "status", + Usage: "CNAPPgoat status to filter on, e.g. 'Deployed', 'Destroyed', 'Error', 'Not Deployed'", Aliases: []string{"s"}, }, } diff --git a/cmd/commands/describe.go b/cmd/commands/describe.go index 478fc5c..294be3a 100644 --- a/cmd/commands/describe.go +++ b/cmd/commands/describe.go @@ -45,7 +45,7 @@ var DescribeCommand = &cli.Command{ reg, c.String("module"), c.String("platform"), - c.String("state")) + c.String("status")) if err != nil { return err } diff --git a/cmd/commands/destroy.go b/cmd/commands/destroy.go index 931308b..25e4789 100644 --- a/cmd/commands/destroy.go +++ b/cmd/commands/destroy.go @@ -24,7 +24,7 @@ var DestroyCommand = &cli.Command{ reg, c.String("module"), c.String("platform"), - c.String("state")) + c.String("status")) if err != nil { return err } diff --git a/cmd/commands/list.go b/cmd/commands/list.go index f726627..7116654 100644 --- a/cmd/commands/list.go +++ b/cmd/commands/list.go @@ -22,7 +22,7 @@ var ListCommand = &cli.Command{ reg, c.String("module"), c.String("platform"), - c.String("state")) + c.String("status")) if err != nil { return err } diff --git a/cmd/commands/provision.go b/cmd/commands/provision.go index deed410..aaa7ee0 100644 --- a/cmd/commands/provision.go +++ b/cmd/commands/provision.go @@ -24,7 +24,7 @@ var ProvisionCommand = &cli.Command{ reg, c.String("module"), c.String("platform"), - c.String("state")) + c.String("status")) if err != nil { return err }