Documentation
¶
Index ¶
- func Run(cmd Cmd) (stdout string, stderr string, err error)
- func Which(arg string, cmds ...string) (cmd string, output string, err error)
- func WhichArgs(argv []string, cmds ...string) (cmd string, output string, err error)
- func WhichWithResolver(cmds []string, resolve WhichResolver) (string, string, error)
- type Cmd
- type WhichResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WhichWithResolver ¶
func WhichWithResolver(cmds []string, resolve WhichResolver) (string, string, error)
WhichWithResolver is `Which` with a custom resolution strategy.
Types ¶
type Cmd ¶
type Cmd struct {
Name string // Command name.
Argv []string // Command arguments.
Dir string // Command's working directory.
// If neither Env nor WithEnv are set, the environment is inherited from os.Environ().
Env map[string]string // If set, the command's environment is _set_ to Env.
WithEnv map[string]string // If set, the command's environment is _added_ to WithEnv.
}
Cmd represents a single command.
Click to show internal directories.
Click to hide internal directories.