Move configuration work to library

Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>

Update to support show correctly

Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
This commit is contained in:
jcsiadal
2022-02-11 16:49:10 +00:00
parent 116d217f88
commit e7aac8773c
18 changed files with 521 additions and 510 deletions

View File

@@ -5,17 +5,17 @@ import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "tftp [OPTIONS]",
Short: "Manage and initialize TFTP",
Use: "tftp [OPTIONS]",
Short: "Manage and initialize TFTP",
Long: "TFTP is a dependent service of Warewulf, this tool will enable the tftp services\n" +
"on your Warewulf master.",
RunE: CobraRunE,
}
SetShow bool
setShow bool
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&SetShow, "show", "s", false, "Show configuration (don't update)")
baseCmd.PersistentFlags().BoolVarP(&setShow, "show", "s", false, "Show configuration (don't update)")
}
// GetRootCommand returns the root cobra.Command for the application.