command

package
v0.0.0-...-ea250c2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Use

func Use(cmd *cobra.Command, mw Func)

Types

type App

type App struct {
	context.Context

	// Global flags.
	ConfigFile string // -c|--config
	Format     string // -f|--format

	// Common resources.
	Config []byte
}

func (*App) ReadConfig

func (app *App) ReadConfig(next CobraFunc) CobraFunc

func (*App) Register

func (app *App) Register(flags *pflag.FlagSet)

type CobraFunc

type CobraFunc func(cmd *cobra.Command, args []string) error

func Errorf

func Errorf(message string, args ...interface{}) CobraFunc

type Func

type Func func(CobraFunc) CobraFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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