This commit is contained in:
Brian Meyers 2019-02-22 15:51:50 -05:00
parent b549b4ca19
commit 5cecced576
2 changed files with 4 additions and 2 deletions

View file

@ -144,8 +144,9 @@ var {{.cmdName}}Cmd = &cobra.Command{
Use: "{{.cmdName}}",
Short: "{{.cmdName}}",
Long: ` + "`" + `Description` + "`" + `,
Run: func(cmd *cobra.Command, args []string) {
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("{{.cmdName}} called, place the command logic here")
return nil
},
}
`

View file

@ -31,7 +31,8 @@ var testCmd = &cobra.Command{
Use: "test",
Short: "test",
Long: `Description`,
Run: func(cmd *cobra.Command, args []string) {
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("test called, place the command logic here")
return nil
},
}