diff options
author | Martin Treusch von Buttlar <martin.tvb@vitraum.de> | 2017-05-17 07:19:05 +0200 |
---|---|---|
committer | Martin Treusch von Buttlar <martin.tvb@vitraum.de> | 2017-05-17 07:19:05 +0200 |
commit | 99bae528846f2fb900ff1168c1e143181f89e597 (patch) | |
tree | 9a21c49f095eb33c28a45fbaa6a20db1f401434c /cmd/ponzu/generate.go | |
parent | fa6a4907557b79f2da6835074233bec717725105 (diff) |
add shorthand commands for add, generate, serve and version
Diffstat (limited to 'cmd/ponzu/generate.go')
-rw-r--r-- | cmd/ponzu/generate.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/ponzu/generate.go b/cmd/ponzu/generate.go index fd3b77e..048addd 100644 --- a/cmd/ponzu/generate.go +++ b/cmd/ponzu/generate.go @@ -417,8 +417,9 @@ func generateContentType(args []string) error { } var generateCmd = &cobra.Command{ - Use: "generate <generator type (,...fields)>", - Short: "generate boilerplate code for various Ponzu components", + Use: "generate <generator type (,...fields)>", + Aliases: []string{"gen", "g"}, + Short: "generate boilerplate code for various Ponzu components", Long: `Generate boilerplate code for various Ponzu components, such as 'content'. The command above will generate a file 'content/review.go' with boilerplate @@ -439,8 +440,9 @@ generate commands return nothing.`, } var contentCmd = &cobra.Command{ - Use: "content <namespace> <field> <field>...", - Short: "generates a new content type", + Use: "content <namespace> <field> <field>...", + Aliases: []string{"c"}, + Short: "generates a new content type", RunE: func(cmd *cobra.Command, args []string) error { return generateContentType(args) }, |