why

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand added in v0.1.1

func NewCommand() *cobra.Command

New returns a cobra command instance based on Handler.

Types

type Handler

type Handler struct {
	handler.Session

	ConfigFile string `usage:"YAML configuration file"`
	Op         string `usage:"Ops.Id value from the config file"`

	Log *log_zap.Mixin
	// contains filtered or unexported fields
}

Handler defines the sub-command flags and logic.

func (*Handler) BindFlags

func (h *Handler) BindFlags(cmd *cobra.Command) []string

BindFlags binds the flags to Handler fields.

It implements cli/handler/cobra.Handler.

func (*Handler) Init

func (h *Handler) Init() handler_cobra.Init

Init defines the command, its environment variable prefix, etc.

It implements cli/handler/cobra.Handler.

func (*Handler) Run

func (h *Handler) Run(ctx context.Context, input handler.Input)

Run performs the sub-command logic.

It implements cli/handler/cobra.Handler.

Jump to

Keyboard shortcuts

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