cli

package
v0.0.0-...-88ab25c Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogLevel

func GetLogLevel(debug, silent bool) logging.Severity

Types

type Command

type Command func(args []string, procInout ProcessInout, env Env) ExitStatus

func NewCommandWithCPUProfile

func NewCommandWithCPUProfile(cmd Command) Command

func NewCommandWithHeapProfile

func NewCommandWithHeapProfile(cmd Command) Command

type Env

type Env func(key string) string

func AnyEnv

func AnyEnv() Env

func ConstEnv

func ConstEnv(result string) Env

func NewEnv

func NewEnv() Env

func StubEnv

func StubEnv(m map[string]string) Env

type ExitStatus

type ExitStatus int
const (
	// ExitNormal means exit successfully.
	// SEE: http://tldp.org/LDP/abs/html/exitcodes.html
	ExitNormal ExitStatus = 0

	// ExitAbnormal means exit not successfully.
	// SEE: http://tldp.org/LDP/abs/html/exitcodes.html
	ExitAbnormal ExitStatus = 1
)

type ProcessInout

type ProcessInout struct {
	Stdin  io.Reader
	Stdout io.WriteCloser
	Stderr io.WriteCloser
}

func AnyProcInout

func AnyProcInout() ProcessInout

func GetProcessInout

func GetProcessInout() ProcessInout

Directories

Path Synopsis
opt

Jump to

Keyboard shortcuts

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