cli: Refactor even more code out of cli package

Quite honestly, I'm trying to clean things up, and removing anything
non-consequential will help!
This commit is contained in:
James Shubin
2024-02-25 19:03:14 -05:00
parent c37ff3efce
commit 71c54ab212
8 changed files with 36 additions and 25 deletions

View File

@@ -26,6 +26,7 @@ import (
"os"
"sort"
cliUtil "github.com/purpleidea/mgmt/cli/util"
"github.com/purpleidea/mgmt/gapi"
_ "github.com/purpleidea/mgmt/lang" // import so the GAPI registers
_ "github.com/purpleidea/mgmt/langpuppet"
@@ -35,18 +36,12 @@ import (
"github.com/urfave/cli/v2"
)
// Flags are some constant flags which are used throughout the program.
type Flags struct {
Debug bool // add additional log messages
Verbose bool // add extra log message output
}
// CLIArgs is a struct of values that we pass to the main CLI function.
type CLIArgs struct {
Program string
Version string
Copying string
Flags Flags
Flags cliUtil.Flags
}
// CLI is the entry point for using mgmt normally from the CLI.