cmd

package
v0.0.0-...-aca30c8 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use: "",

	PersistentPreRun: func(ccmd *cobra.Command, args []string) {
		debug, err := ccmd.Flags().GetBool("verbose")

		if err != nil {
			log.WithError(err).Error("failed to parse verbose flag")
			os.Exit(1)
			return
		}

		if debug {
			log.SetLevel(log.DebugLevel)
		}
	},

	Run: func(cmd *cobra.Command, args []string) {
		cmd.Help()
	},
}

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