From 2ac2625b299099dfab2d5ef9d3f9544cb877262f Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Sat, 19 Dec 2020 00:40:05 -0800 Subject: [PATCH] Add basic NFS configure command template --- internal/app/wwctl/configure/nfs/main.go | 7 +++++++ internal/app/wwctl/configure/nfs/root.go | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/internal/app/wwctl/configure/nfs/main.go b/internal/app/wwctl/configure/nfs/main.go index 2055234b..5f191f62 100644 --- a/internal/app/wwctl/configure/nfs/main.go +++ b/internal/app/wwctl/configure/nfs/main.go @@ -1 +1,8 @@ package nfs + +import "github.com/spf13/cobra" + +func CobraRunE(cmd *cobra.Command, args []string) error { + + return nil +} diff --git a/internal/app/wwctl/configure/nfs/root.go b/internal/app/wwctl/configure/nfs/root.go index 2055234b..b0681bcd 100644 --- a/internal/app/wwctl/configure/nfs/root.go +++ b/internal/app/wwctl/configure/nfs/root.go @@ -1 +1,22 @@ package nfs + +import "github.com/spf13/cobra" + +var ( + baseCmd = &cobra.Command{ + Use: "nfs", + Short: "NFS configuration", + Long: "NFS Config", + RunE: CobraRunE, + } + SetShow bool +) + +func init() { + baseCmd.PersistentFlags().BoolVarP(&SetShow, "show", "s", false, "Show configuration (don't update)") +} + +// GetRootCommand returns the root cobra.Command for the application. +func GetCommand() *cobra.Command { + return baseCmd +}