cmd

package
v0.0.0-...-cd37d0a Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Root = &cobra.Command{
	Use:   "dummy",
	Short: "A dummy program",
	Long:  `This is a longer description for a dummy program, which does not do anything and only exists for the purpose of being an example.`,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		fmt.Println("I'm always printed, because I'm in PersistentPreRun. (server)")
		cmd.Println("I'm always printed, because I'm in PersistentPreRun. (client)")
	},
	PreRun: func(cmd *cobra.Command, args []string) {
		fmt.Println("Hey, run me before Run execute")
	},
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("I'm dummy")
		cmd.Println("This is supposed to print to the other output")
	},
	DisableAutoGenTag: true,
}

Root is the main 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