cfgcmd

package
v1.5.0-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cfgcmd groups config commands in their own package

Index

Constants

This section is empty.

Variables

View Source
var ConfigCmd = &cobra.Command{
	Use:     "config",
	GroupID: cmd.GROUP_SUBSYSTEMS,
	Short:   "Configure geneos command environment",
	Long: strings.ReplaceAll(`
The commands in the |config| subsystem allow you to control the
environment of the |geneos| program itself. Please see the
descriptions of the commands below for more information.

If you run this command directly then you will either be shown the
output of |geneos config show| or |geneos config set [ARGS]| if you
supply any further arguments that contain an "=".
`, "|", "`"),
	Example: `
geneos config
geneos config geneos=/opt/itrs
`,
	SilenceUsage: true,
	Annotations: map[string]string{
		"wildcard":     "false",
		"needshomedir": "false",
	},
	DisableFlagParsing:    true,
	DisableFlagsInUseLine: true,
	RunE: func(command *cobra.Command, args []string) (err error) {
		var doSet bool
		for _, a := range args {
			if strings.Contains(a, "=") {
				doSet = true
			}
		}
		if doSet {
			return cmd.RunE(command.Root(), []string{"config", "set"}, args)
		}
		return cmd.RunE(command.Root(), []string{"config", "show"}, args)
	},
}

ConfigCmd represents the config command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL