Files
warewulf/internal/app/wwctl/image/show/root.go
Jonathon Anderson 5494424c09 wwctl image completions and arguments
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-09 16:13:21 -07:00

31 lines
816 B
Go

package show
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "show [OPTIONS] IMAGE",
Short: "Show root fs dir for image",
Long: `Shows the base directory for the chroot of the given image.
More information about the image can be shown with the '-a' option.`,
RunE: CobraRunE,
ValidArgsFunction: completions.Images(0), // no limit
Args: cobra.ExactArgs(1),
}
ShowAll bool
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&ShowAll, "all", "a", false, "Show all information about an image")
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}