Skip to content

Commit

Permalink
Fix(cluster add): fix type's flag name is mismatched in function and …
Browse files Browse the repository at this point in the history
…add an example of --type

Signed-off-by: WhereAreBugs <[email protected]>
  • Loading branch information
WhereAreBugs committed Dec 18, 2023
1 parent 521a7de commit 7a1e7b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/command/cluster/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const (
ADD_EXAMPLE = `Examples:
$ curveadm add my-cluster # Add a cluster named 'my-cluster'
$ curveadm add my-cluster -m "deploy for test" # Add a cluster with description
$ curveadm add my-cluster -f /path/to/topology.yaml # Add a cluster with specified topology`
$ curveadm add my-cluster -f /path/to/topology.yaml # Add a cluster with specified topology
$ curveadm add my-cluster --type develop # Add a cluster with specified type (develop,production,test)`
)

var (
Expand Down Expand Up @@ -144,7 +145,7 @@ func checkTopology(curveadm *cli.CurveAdm, data string, options addOptions) erro
}

func checkAddOptions(cmd *cobra.Command) error {
deployType, err := cmd.Flags().GetString("deploy-type")
deployType, err := cmd.Flags().GetString("type")
if err != nil {
return err
}
Expand Down

0 comments on commit 7a1e7b8

Please sign in to comment.