Help us shape the future of Go! Take the 2026 Go Developer Survey

command

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiMeta

type ApiMeta struct {
	Color bool   // True if output should be colored
	Ui    cli.Ui // Ui for output

	// Gate Api client.
	GateClient *gate.APIClient

	// Spin CLI configuration.
	Config config.Config
	// contains filtered or unexported fields
}

ApiMeta is the state & utility shared by our commands.

func (*ApiMeta) Colorize

func (m *ApiMeta) Colorize() *colorstring.Colorize

Colorize initializes the ui colorization.

func (*ApiMeta) GlobalFlagSet

func (m *ApiMeta) GlobalFlagSet(cmd string) *flag.FlagSet

GlobalFlagSet adds all global options to the flagset, and returns the flagset object for further modification by the subcommand.

func (*ApiMeta) Help

func (m *ApiMeta) Help() string

func (*ApiMeta) InitializeClient

func (m *ApiMeta) InitializeClient() (*http.Client, error)

func (*ApiMeta) Process

func (m *ApiMeta) Process(args []string) ([]string, error)

Process will process the meta-parameters out of the arguments. This potentially modifies the args in-place. It will return the resulting slice. NOTE: This expects the flag set to be parsed prior to invoking it.

type ColorizeUi

type ColorizeUi struct {
	Colorize    *colorstring.Colorize
	OutputColor string
	InfoColor   string
	ErrorColor  string
	WarnColor   string
	Ui          cli.Ui
}

func (*ColorizeUi) Ask

func (u *ColorizeUi) Ask(query string) (string, error)

func (*ColorizeUi) AskSecret

func (u *ColorizeUi) AskSecret(query string) (string, error)

func (*ColorizeUi) Error

func (u *ColorizeUi) Error(message string)

func (*ColorizeUi) Info

func (u *ColorizeUi) Info(message string)

func (*ColorizeUi) Output

func (u *ColorizeUi) Output(message string)

func (*ColorizeUi) Warn

func (u *ColorizeUi) Warn(message string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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