Skip to content

Commit

Permalink
create cobra command 2
Browse files Browse the repository at this point in the history
  • Loading branch information
toshinari123 committed Mar 5, 2024
1 parent 098add3 commit b35e7be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/pageship/app/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ func init() {
var generateCmd = &cobra.Command{
Use: "generate [command]",
Short: "Generate files",
Args: cobra.NoArgs, //if unknown command, will return error just like main pageship command
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("guh")
cmd.Help() //show help if no subcommand supplied
return nil
},
}
Expand All @@ -24,7 +25,7 @@ var generateDockerfileCmd = &cobra.Command{
Use: "dockerfile",
Short: "Generate dockerfile",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("guh")
fmt.Println("buh")
return nil
},
}

0 comments on commit b35e7be

Please sign in to comment.