Added target and terminal support
[src/xds/xds-cli.git] / cmd-projects.go
index 1aa0dfc..e056563 100644 (file)
@@ -63,7 +63,7 @@ func initCmdProjects(cmdDef *[]cli.Command) {
                        },
                        {
                                Name:   "get",
-                               Usage:  "Get a property of a project",
+                               Usage:  "Get properties of a project",
                                Action: projectsGet,
                                Flags: []cli.Flag{
                                        cli.StringFlag{
@@ -180,12 +180,12 @@ func _displayProjects(prjs []xaapiv1.ProjectConfig, verbose bool) {
 func projectsAdd(ctx *cli.Context) error {
 
        // Decode project type
-       var ptype xaapiv1.ProjectType
+       var pType xaapiv1.ProjectType
        switch strings.ToLower(ctx.String("type")) {
        case "pathmap", "pm":
-               ptype = xaapiv1.TypePathMap
+               pType = xaapiv1.TypePathMap
        case "cloudsync", "cs":
-               ptype = xaapiv1.TypeCloudSync
+               pType = xaapiv1.TypeCloudSync
        default:
                return cli.NewExitError("Unknown project type", 1)
        }
@@ -193,7 +193,7 @@ func projectsAdd(ctx *cli.Context) error {
        prj := xaapiv1.ProjectConfig{
                ServerID:   XdsServerIDGet(),
                Label:      ctx.String("label"),
-               Type:       ptype,
+               Type:       pType,
                ClientPath: ctx.String("path"),
                ServerPath: ctx.String("server-path"),
        }