cmd

package
v0.0.0-...-c9871c0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MachineConfig map[string]any
View Source
var PathCmd = &cobra.Command{
	Use:   "path",
	Short: "Retrieves the path to the machine and user configs",
	Long: `You can use this command to retrieve the path to the configuration
	files that the application looks for on your system.
	
	If you don't specify any arguments for this command, it returns the paths
	to both files, with the machine scope configuration file first.`,
	Run:       showPath,
	ValidArgs: []string{"machine", "user"},
	Args:      cobra.MatchAll(cobra.MaximumNArgs(2), cobra.OnlyValidArgs),
}

PathCmd represents the path command

View Source
var RootCmd = &cobra.Command{
	Use:   "tstoy",
	Short: "A fictional application to demonstrate writing a DSC Resource.",
	Long: `This is a fictional application with a handful of configuration
options defined so you can write a Desired State Configuration (DSC) Resource
against a known application.

While a real application could define its own manifest for a DSC Resource,
tstoy does not. Instead, the DSC documentation includes a number of example
DSC Resources all managing this application but written in different
programming languages.`,
	Version: version,
}

RootCmd represents the base command when called without any subcommands

View Source
var ShowCmd = &cobra.Command{
	Use:   "show",
	Short: "Shows the merged configuration options for the application.",
	Long: `This command shows the merged configuration options for the
	application. The settings are applied first from the machine-level,
	then the user-level, then any environment variables, and finally any
	flags passed to the command.`,
	Run:  run,
	Args: cobra.MatchAll(cobra.NoArgs),
}

ShowCmd represents the show command

View Source
var UserConfig map[string]any

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

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