Skip to content

Commit

Permalink
Create cobra command
Browse files Browse the repository at this point in the history
  • Loading branch information
toshinari123 committed Mar 5, 2024
1 parent 39f6423 commit 098add3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cmd/pageship/app/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package app

import (
"fmt"

"github.com/spf13/cobra"
)

func init() {
rootCmd.AddCommand(generateCmd)
generateCmd.AddCommand(generateDockerfileCmd)
}

var generateCmd = &cobra.Command{
Use: "generate [command]",
Short: "Generate files",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("guh")
return nil
},
}

var generateDockerfileCmd = &cobra.Command{
Use: "dockerfile",
Short: "Generate dockerfile",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("guh")
return nil
},
}

0 comments on commit 098add3

Please sign in to comment.