cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cli contains helper functionality for applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecEnv

type ExecEnv struct {
	// Args are the arguments, not including the application name or command.
	Args []string
	// Stdin is the stdin.
	Stdin io.Reader
	// Stdout is the stdout.
	Stdout io.Writer
	// Stderr is the stderr.
	Stderr io.Writer
	// Env is the environment. For values set as KEY=, there will be an empty
	// string associated as the value.
	Env map[string]string
	// Start is the time the command started.
	Start time.Time
}

ExecEnv is the exec environment for the CLI. This is what is passed to commands.

type RunEnv

type RunEnv struct {
	// Args are the arguments, not including the application name.
	Args []string
	// Stdin is the stdin.
	Stdin io.Reader
	// Stdout is the stdout.
	Stdout io.Writer
	// Stderr is the stderr.
	Stderr io.Writer
	// Environ is the environment, specified as KEY=VALUE or KEY=.
	Environ []string
}

RunEnv is the runtime environment for the CLI.

Directories

Path Synopsis
Package clicobra contains helper functionality for applications using Cobra.
Package clicobra contains helper functionality for applications using Cobra.
Package cliplugin contains helper functionality for protoc plugins.
Package cliplugin contains helper functionality for protoc plugins.

Jump to

Keyboard shortcuts

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