diff --git a/cmd/init.go b/cmd/init.go new file mode 100644 index 0000000..25e65b2 --- /dev/null +++ b/cmd/init.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "fmt" + "log" + + "github.com/spf13/cobra" +) + +func init() { + RootCmd.AddCommand(initCommand) +} + +var initCommand = &cobra.Command { + Use: "init", + Run: func(cmd *cobra.Command, args []string) { + if(len(args) <= 0) { + log.Fatal(cmd.OutOrStdout(), "no arguments provided to init") + } + // we will do something here, for now just print args[0] + fmt.Fprintf(cmd.OutOrStdout(), args[0]) + }, +}