Files
warewulf/internal/app/wwctl/version/root.go
Jonathon Anderson 65f85a00a3 wwctl completions for no args
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-09 16:13:57 -07:00

29 lines
705 B
Go

package version
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
Use: "version",
Short: "Version information",
Long: "This command will print the Warewulf version.",
RunE: CobraRunE,
Args: cobra.NoArgs,
Aliases: []string{"vers"},
ValidArgsFunction: completions.None,
}
ListFull bool
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&ListFull, "full", "f", false, "List all compiled in variables.")
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}