Added some Cobra framework for new command groups as I'm thinking through the interface.

This commit is contained in:
Gregory Kurtzer
2020-11-13 21:29:22 -08:00
parent 77bac0c8a8
commit c39257a7ff
5 changed files with 96 additions and 7 deletions

View File

@@ -0,0 +1,32 @@
package show
import (
"fmt"
"github.com/spf13/cobra"
)
var (
showCmd = &cobra.Command{
Use: "show",
Short: "Show Warewulf Overlay objects",
Long: "Warewulf show overlay objects",
RunE: CobraRunE,
}
)
func init() {
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return showCmd
}
func CobraRunE(cmd *cobra.Command, args []string) error {
fmt.Printf("Show: Hello World\n")
return nil
}