Add init command

This commit is contained in:
Miguel de la Cruz 2020-02-29 00:49:55 +01:00
parent d7a4b25950
commit 573ea9e136
5 changed files with 39 additions and 9 deletions

21
cmd/init.go Normal file
View file

@ -0,0 +1,21 @@
package cmd
import (
"github.com/spf13/cobra"
)
func InitCmd() *cobra.Command {
return &cobra.Command{
Use: "init",
Short: "Creates a new campaign in the current directory",
Args: cobra.NoArgs,
RunE: initCmdF,
}
// add mandatory flags for epic, tags, etc
}
func initCmdF(_ *cobra.Command, _ []string) error {
// creates the campaign.json file
return nil
}

View file

@ -14,6 +14,7 @@ func RootCmd() *cobra.Command {
}
cmd.AddCommand(
InitCmd(),
TokenCmd(),
)