diff options
author | Martin Treusch von Buttlar <martin.tvb@vitraum.de> | 2017-05-16 06:40:54 +0200 |
---|---|---|
committer | Martin Treusch von Buttlar <martin.tvb@vitraum.de> | 2017-05-16 06:40:54 +0200 |
commit | d89c33c1398428d4a456ca0252e6b1718efb0b96 (patch) | |
tree | 84b24ddb8ad8c651799bb4fdd04290d751b2b11d /cmd/ponzu/generate.go | |
parent | 8181c4f325519055d7fec9982737b0a22f175534 (diff) |
move usage examples to cobra field of same name
Diffstat (limited to 'cmd/ponzu/generate.go')
-rw-r--r-- | cmd/ponzu/generate.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd/ponzu/generate.go b/cmd/ponzu/generate.go index cc2b93a..fd3b77e 100644 --- a/cmd/ponzu/generate.go +++ b/cmd/ponzu/generate.go @@ -421,9 +421,6 @@ var generateCmd = &cobra.Command{ Short: "generate boilerplate code for various Ponzu components", Long: `Generate boilerplate code for various Ponzu components, such as 'content'. -Example: -$ ponzu gen content review title:"string" body:"string" rating:"int" tags:"[]string" - The command above will generate a file 'content/review.go' with boilerplate methods, as well as struct definition, and corresponding field tags like: @@ -438,10 +435,12 @@ The generate command will intelligently parse more sophisticated field names such as 'field_name' and convert it to 'FieldName' and vice versa, only where appropriate as per common Go idioms. Errors will be reported, but successful generate commands return nothing.`, + Example: `$ ponzu gen content review title:"string" body:"string" rating:"int" tags:"[]string"`, } var contentCmd = &cobra.Command{ - Use: "content <namespace> <field> <field>...", + Use: "content <namespace> <field> <field>...", + Short: "generates a new content type", RunE: func(cmd *cobra.Command, args []string) error { return generateContentType(args) }, |