cmd

package module
v0.0.0-...-357e548 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: MIT Imports: 9 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check() error

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func New

func New(workingDir string, format richtext.Format, flags ...Flag) *Context

func (*Context) Execf

func (c *Context) Execf(format string, a ...interface{}) (string, string, error)

func (*Context) PipeExecf

func (c *Context) PipeExecf(r io.Reader, format string, a ...interface{}) (string, string, error)

type Error

type Error struct {
	ExitCode int
	CmdLine  string
	StdErr   string
	// contains filtered or unexported fields
}

Returned when the execution was started correctly, but program returned an error

func (*Error) Error

func (e *Error) Error() string

type Flag

type Flag uint
const (
	MustPanic         Flag //panic on error
	MustExit               //Exit on error
	Warn                   //Errors get a 'Warning' level output
	NoAnnotate             //When outputting stdout/stderr, the output is passed through unchanged
	StdErrInResult         //StdErr is included in 'output'
	PassThrough            //Alias for PassThroughStdOut, PassThroughStdErr & PassThroughStdIn
	PassThroughStdOut      //Passes through stdout, output will always be an empty string
	PassThroughStdErr      //StdErr passthrough, error will only contain exit code.
	PassThroughStdIn
	TrimSpace
	FirstLine
	Strict //does 'set -eu -o pipefail'
	Verbose
)

func (Flag) String

func (i Flag) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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