MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / init

Function init

internal/cli/root.go:36–50  ·  view source on GitHub ↗

init initializes the root command and sets up flags

()

Source from the content-addressed store, hash-verified

34
35// init initializes the root command and sets up flags
36func init() {
37 // Add persistent flags
38 addPersistentFlags(RootCmd)
39
40 // Add commands
41 RootCmd.AddCommand(newConfigWizardCmd())
42 RootCmd.AddCommand(newNodesCmd())
43 RootCmd.AddCommand(newGuestsCmd())
44 RootCmd.AddCommand(newTasksCmd())
45 RootCmd.AddCommand(newStorageCmd())
46 RootCmd.AddCommand(newCommunityScriptsCmd())
47
48 // Output format flag (inherited by all subcommands)
49 RootCmd.PersistentFlags().StringP("output", "o", outputJSON, "Output format: json, table")
50}
51
52// runMainApplication runs the main application
53func runMainApplication(cmd *cobra.Command, args []string) error {

Callers

nothing calls this directly

Calls 7

addPersistentFlagsFunction · 0.85
newConfigWizardCmdFunction · 0.85
newNodesCmdFunction · 0.85
newGuestsCmdFunction · 0.85
newTasksCmdFunction · 0.85
newStorageCmdFunction · 0.85
newCommunityScriptsCmdFunction · 0.85

Tested by

no test coverage detected