From 6e14b0d4beea8da2210ab9b8469b605a83ef775f Mon Sep 17 00:00:00 2001 From: Tamer Tas <contact@tmrts.com> Date: Sat, 2 Jan 2016 09:29:12 +0200 Subject: [PATCH] Rename template-name to template-tag --- pkg/cmd/delete.go | 2 +- pkg/cmd/download.go | 4 ++-- pkg/cmd/list.go | 2 +- pkg/cmd/rename.go | 6 +++--- pkg/cmd/report.go | 2 +- pkg/cmd/save.go | 6 +++--- pkg/cmd/use.go | 4 ++-- pkg/cmd/validate.go | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkg/cmd/delete.go b/pkg/cmd/delete.go index 777db92..a98fa5b 100644 --- a/pkg/cmd/delete.go +++ b/pkg/cmd/delete.go @@ -15,7 +15,7 @@ import ( // Delete contains the cli-command for deleting templates. var Delete = &cli.Command{ - Use: "delete <template-name>", + Use: "delete <template-tag>", Short: "Delete a project template from the template registry", Run: func(c *cli.Command, args []string) { MustValidateVarArgs(args, validate.Argument{"template-path", validate.Alphanumeric}) diff --git a/pkg/cmd/download.go b/pkg/cmd/download.go index 996015c..d546db7 100644 --- a/pkg/cmd/download.go +++ b/pkg/cmd/download.go @@ -94,13 +94,13 @@ func downloadZip(URL, targetDir string) error { // Download contains the cli-command for downloading templates from github. var Download = &cli.Command{ - Use: "download <template-repo> <template-name>", + Use: "download <template-repo> <template-tag>", Short: "Download a project template from a github repository to template registry", // FIXME Half-Updates leave messy templates Run: func(c *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{ {"template-repo", validate.UnixPath}, - {"template-name", validate.Alphanumeric}, + {"template-tag", validate.Alphanumeric}, }) templateURL, templateName := args[0], args[1] diff --git a/pkg/cmd/list.go b/pkg/cmd/list.go index 97369d8..3ba1670 100644 --- a/pkg/cmd/list.go +++ b/pkg/cmd/list.go @@ -37,7 +37,7 @@ func ListTemplates() (map[string]bool, error) { // List contains the cli-command for printing a list of saved templates. var List = &cli.Command{ - Use: "list <template-path> <template-name>", + Use: "list <template-path> <template-tag>", Short: "List project templates found in the local template registry", Run: func(c *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{}) diff --git a/pkg/cmd/rename.go b/pkg/cmd/rename.go index 18feabc..bf68889 100644 --- a/pkg/cmd/rename.go +++ b/pkg/cmd/rename.go @@ -22,12 +22,12 @@ func renameTemplate(oldPath, newPath string) error { // Rename contains the cli-command for renaming templates in the template registry. var Rename = &cli.Command{ Hidden: true, - Use: "rename <old-template-name> <new-template-name>", + Use: "rename <old-template-tag> <new-template-tag>", Short: "Rename a project template", Run: func(c *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{ - {"old-template-name", validate.UnixPath}, - {"new-template-name", validate.UnixPath}, + {"old-template-tag", validate.UnixPath}, + {"new-template-tag", validate.UnixPath}, }) tmplName, newTmplName := args[0], args[1] diff --git a/pkg/cmd/report.go b/pkg/cmd/report.go index 0a8f961..3f551ed 100644 --- a/pkg/cmd/report.go +++ b/pkg/cmd/report.go @@ -141,7 +141,7 @@ func createIssue() (string, error) { // Report contains the cli-command for creating github issues. var Report = &cli.Command{ Use: "report", - Short: "Creates an issue in the github repository", + Short: "Create an issue in the github repository", Run: func(c *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{}) diff --git a/pkg/cmd/save.go b/pkg/cmd/save.go index 3a37409..4ed4992 100644 --- a/pkg/cmd/save.go +++ b/pkg/cmd/save.go @@ -16,13 +16,13 @@ import ( // Save contains the cli-command for saving templates to template registry. var Save = &cli.Command{ - // TODO rename template-name to template-tag - Use: "save <template-path> <template-name>", + // TODO rename template-tag to template-tag + Use: "save <template-path> <template-tag>", Short: "Save a project template to local template registry", Run: func(c *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{ {"template-path", validate.UnixPath}, - {"template-name", validate.Alphanumeric}, + {"template-tag", validate.Alphanumeric}, }) tmplDir, templateName := args[0], args[1] diff --git a/pkg/cmd/use.go b/pkg/cmd/use.go index c318c10..51a3284 100644 --- a/pkg/cmd/use.go +++ b/pkg/cmd/use.go @@ -26,11 +26,11 @@ func TemplateInRegistry(name string) (bool, error) { // TODO add --use-cache flag to execute a template from previous answers to prompts // Use contains the cli-command for using templates located in the local template registry. var Use = &cli.Command{ - Use: "use <template-name> <target-dir>", + Use: "use <template-tag> <target-dir>", Short: "Execute a project template in the given directory", Run: func(c *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{ - {"template-name", validate.UnixPath}, + {"template-tag", validate.UnixPath}, {"target-dir", validate.UnixPath}, }) diff --git a/pkg/cmd/validate.go b/pkg/cmd/validate.go index 5288492..f92ed64 100644 --- a/pkg/cmd/validate.go +++ b/pkg/cmd/validate.go @@ -16,7 +16,7 @@ var ( // Validate contains the cli-command for validating templates. var Validate = &cli.Command{ Use: "validate", - Short: "Validates a template", + Short: "Validate a template", Run: func(_ *cli.Command, args []string) { MustValidateArgs(args, []validate.Argument{ {"template-path", validate.UnixPath}, -- GitLab