diff --git a/cli/command/cluster/add.go b/cli/command/cluster/add.go index 4c9b808b1..80d4b0949 100644 --- a/cli/command/cluster/add.go +++ b/cli/command/cluster/add.go @@ -57,7 +57,7 @@ var ( type addOptions struct { name string - descriotion string + description string filename string deployType string } @@ -81,7 +81,7 @@ func NewAddCommand(curveadm *cli.CurveAdm) *cobra.Command { } flags := cmd.Flags() - flags.StringVarP(&options.descriotion, "description", "m", "", "Description for cluster") + flags.StringVarP(&options.description, "description", "m", "", "Description for cluster") flags.StringVarP(&options.filename, "topology", "f", "", "Specify the path of topology file") flags.StringVarP(&options.deployType, "deploy-type", "t", "develop", "Specify the deploy type of cluster") return cmd @@ -186,7 +186,7 @@ func runAdd(curveadm *cli.CurveAdm, options addOptions) error { // 4) insert cluster (with topology) into database uuid := uuid.NewString() - err = storage.InsertCluster(name, uuid, options.descriotion, data, options.deployType) + err = storage.InsertCluster(name, uuid, options.description, data, options.deployType) if err != nil { return errno.ERR_INSERT_CLUSTER_FAILED.E(err) }