cmd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version  string
	Revision string
)
View Source
var RootCmd = &cobra.Command{
	Use:           "git-ghost",
	Short:         "git-ghost",
	SilenceErrors: false,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if cmd.Use == "version" {
			return nil
		}
		err := validateEnvironment()
		if err != nil {
			return err
		}
		err = globalOpts.SetDefaults()
		if err != nil {
			return err
		}
		err = globalOpts.Validate()
		if err != nil {
			return err
		}
		switch globalOpts.verbose {
		case 0:
			log.SetLevel(log.ErrorLevel)
		case 1:
			log.SetLevel(log.InfoLevel)
		case 2:
			log.SetLevel(log.DebugLevel)
		case 3:
			log.SetLevel(log.TraceLevel)
		}
		return nil
	},
}

Functions

func NewDeleteCommand

func NewDeleteCommand() *cobra.Command

func NewListCommand

func NewListCommand() *cobra.Command

func NewPullCommand

func NewPullCommand() *cobra.Command

func NewPushCommand

func NewPushCommand() *cobra.Command

func NewShowCommand

func NewShowCommand() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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