Documentation
¶
Overview ¶
Utilities that make executing commands on the local system a little bit easier.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Which ¶ added in v1.7.10
Locates the first path containing the given command. The directories listed in the environment variable "PATH" will be checked, in order. If additional directories are specified in the path variadic argument, they will be checked first. If the command is not in any path, an empty string will be returned.
func WhichAll ¶ added in v1.7.10
Locates the all paths containing the given command. The directories listed in the environment variable "PATH" will be checked, in order. If additional directories are specified in the path variadic argument, they will be checked first. If the command is not in any path, an empty slice will be returned.
Types ¶
type Cmd ¶
type Cmd struct {
*exec.Cmd
MonitorInterval time.Duration
OnStart CommandStatusFunc
OnMonitor CommandStatusFunc
OnComplete CommandStatusFunc
OnSuccess CommandStatusFunc
OnError CommandStatusFunc
// contains filtered or unexported fields
}
func (*Cmd) CombinedOutput ¶
func (*Cmd) WaitStatus ¶
Wait for the process to complete, then return the last status. Process must have been started using the Start() function.
type CommandStatusFunc ¶
type CommandStatusFunc func(Status)