Documentation ¶
Index ¶
- Constants
- func Cmd(command string, args ...string) (*exec.Cmd, error)
- func CmdParsed(statement string) (*exec.Cmd, error)
- func Exec(command string, args ...string) error
- func Fatal(err error)
- func Fatalf(format string, args ...interface{})
- func Fork(command string, args ...string) error
- func IsEPIPE(err error) bool
- func MustCmd(command string, args ...string) *exec.Cmd
- func MustCmdParsed(statement string) *exec.Cmd
- func MustCmds(statements ...string) []*exec.Cmd
- func MustPassword(prompt string) string
- func Output(command string, args ...string) ([]byte, error)
- func Password(prompt string) (string, error)
- func Passwordf(format string, args ...interface{}) (string, error)
- func Pipe(commands ...*exec.Cmd) error
- func Prompt(prompt string) string
- func PromptFrom(stdout io.Writer, stdin io.Reader, prompt string) string
- func Promptf(format string, args ...interface{}) string
- func Put(stdin io.Reader, command string, args ...string) error
- func PutOutput(stdin io.Reader, command string, args ...string) ([]byte, error)
Constants ¶
const ErrUnexpectedNewLine exception.Class = "unexpected newline"
ErrUnexpectedNewLine is returned from scan.go when you just hit enter with nothing in the prompt
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
Exec runs a command with a given list of arguments. It resolves the command name in your $PATH list for you. It does not show output.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf exits the process with a given formatted message to stderr.
func Fork ¶
Fork runs a command with a given list of arguments. It resolves the command name in your $PATH list for you. It shows output and allows input.
func MustCmd ¶
MustCmd returns a new command with the fully qualified path of the executable. It panics on error.
func MustCmdParsed ¶
MustCmdParsed returns a command for a full comamnd statement.
func MustPassword ¶
MustPassword gives a prompt and reads input until newlines without printing the input to screen. It panics on error.
func Output ¶
Output runs a command with a given list of arguments. It resolves the command name in your $PATH list for you. It captures combined output and returns it as bytes.
func Password ¶
Password gives a prompt and reads input until newlines without printing the input to screen.
func Passwordf ¶
Passwordf gives a prompt and reads input until newlines without printing the input to screen.
func Pipe ¶
Pipe runs commands in sequence, piping combined output to the standard in of the next command.
func PromptFrom ¶
PromptFrom gives a prompt and reads input until newlines from a given set of streams.
Types ¶
This section is empty.