From e57ea10df56ed4ab340cd520173b82cc5391881d Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Tue, 1 Feb 2022 16:10:48 +0100 Subject: [PATCH] fix index --- internal/app/wwctl/container/show/main.go | 4 ++-- internal/app/wwctl/container/show/root.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/app/wwctl/container/show/main.go b/internal/app/wwctl/container/show/main.go index acce6e02..a902eee2 100644 --- a/internal/app/wwctl/container/show/main.go +++ b/internal/app/wwctl/container/show/main.go @@ -9,7 +9,7 @@ import ( ) func CobraRunE(cmd *cobra.Command, args []string) error { - containerName := args[1] + containerName := args[0] if !container.ValidName(containerName) { return fmt.Errorf("%s is not a valid container", containerName) } @@ -17,7 +17,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error { fmt.Printf("%s\n", container.RootFsDir(containerName)) } else { fmt.Printf("Name: %s\n", containerName) - fmt.Printf("Rootsfs: %s\n", container.RootFsDir(containerName)) + fmt.Printf("Rootfs: %s\n", container.RootFsDir(containerName)) nodeDB, _ := node.New() nodes, _ := nodeDB.FindAllNodes() diff --git a/internal/app/wwctl/container/show/root.go b/internal/app/wwctl/container/show/root.go index c4e44489..92db694b 100644 --- a/internal/app/wwctl/container/show/root.go +++ b/internal/app/wwctl/container/show/root.go @@ -11,7 +11,7 @@ var ( Use: "show [OPTIONS] CONTAINER", Short: "Show root fs dir for container", Long: `Shows the base directory for the chroot of the given container. - More information about the conainer can be hosw with -a option.`, +More information about the conainer can be shown with the '-a' option.`, RunE: CobraRunE, ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { if len(args) != 0 { @@ -27,7 +27,7 @@ var ( ShowAll bool ) -func Init() { +func init() { baseCmd.PersistentFlags().BoolVarP(&ShowAll, "all", "a", false, "Show all information about a container") }