2026-04-29
This commit is contained in:
30
internal/app/control/configure/root.go
Normal file
30
internal/app/control/configure/root.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package configure
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"gitea.sunhpc.com/kelvin/sunhpc/internal/app/control/configure/dhcp"
|
||||
)
|
||||
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "config [options]",
|
||||
Short: "Manage sunhpc configuration",
|
||||
Long: "This application allows you to manage and initialize Sunhpc configuration\n" +
|
||||
"services based on the configuration in the sunhpc.conf file.",
|
||||
RunE: CobraRunE,
|
||||
Args: cobra.NoArgs,
|
||||
}
|
||||
allFunctions bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
baseCmd.AddCommand(dhcp.GetCommand())
|
||||
baseCmd.Flags().BoolVarP(&allFunctions, "all", "a", false, "Configure all services")
|
||||
}
|
||||
|
||||
// GetRootCommand returns the root cobra.Command for the application.
|
||||
func GetCommand() *cobra.Command {
|
||||
return baseCmd
|
||||
}
|
||||
Reference in New Issue
Block a user