Created template for server process subcommands

This commit is contained in:
Gregory Kurtzer
2020-12-10 20:57:32 -08:00
parent a5e79ae560
commit c53c97dbcf
12 changed files with 122 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
package server
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "server",
Short: "Warewulf server process commands",
Long: "Warewulf profiles...",
}
test bool
)
func init() {
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}

View File

@@ -0,0 +1,8 @@
package start
import "github.com/spf13/cobra"
func CobraRunE(cmd *cobra.Command, args []string) error {
return nil
}

View File

@@ -0,0 +1,20 @@
package start
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "start",
Short: "Start Warewulf server",
Long: "Warewulf Server ",
RunE: CobraRunE,
}
)
func init() {
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}

View File

@@ -0,0 +1,8 @@
package status
import "github.com/spf13/cobra"
func CobraRunE(cmd *cobra.Command, args []string) error {
return nil
}

View File

@@ -0,0 +1,20 @@
package status
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "status",
Short: "Warewulf server status",
Long: "Warewulf Server ",
RunE: CobraRunE,
}
)
func init() {
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}

View File

@@ -0,0 +1,8 @@
package stop
import "github.com/spf13/cobra"
func CobraRunE(cmd *cobra.Command, args []string) error {
return nil
}

View File

@@ -0,0 +1,20 @@
package stop
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "stop",
Short: "Stop Warewulf server",
Long: "Warewulf Server ",
RunE: CobraRunE,
}
)
func init() {
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}