command

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreRunE

func PreRunE(cmd Command) func(*cobra.Command, []string) error

PreRunE validates and load the arguments passed to the command.

func RunE

func RunE(cmd Command) func(*cobra.Command, []string) error

RunE runs a validated command.

Types

type Command

type Command interface {
	// Validate and load the arguments passed to the command.
	Validate(args []string) error

	// Run a validated command.
	Run() error
}

Command represents an svcat command.

type Context

type Context struct {
	// Output should be used instead of directly writing to stdout/stderr, to enable unit testing.
	Output io.Writer

	// svcat application, the library behind this cli
	App *az.App
}

Context is ambient data necessary to run any az command.

func NewContext

func NewContext() *Context

NewContext for the svcatt cli

Jump to

Keyboard shortcuts

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