Added some Cobra framework for new command groups as I'm thinking through the interface.
This commit is contained in:
32
internal/app/wwctl/overlay/show/root.go
Normal file
32
internal/app/wwctl/overlay/show/root.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user