package
Version:
v0.0.33
Opens a new window with list of versions in this module.
Published: Aug 1, 2024
License: MPL-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Command is a functional options wrapper around exec.Cmd.
NewCommand creates a new command.
func (*Command) Cmd ¶
Cmd takes a context and returns an instance of *exec.Cmd.
func (*Command) Run ¶
Run takes a context.Context and executes itself. It returns an instance of
*exec.Cmd and an error.
ExecOpt is a functional options wrapper around *exec.Cmd. These options
are applied to the Cmd instance before it is run.
Opt is a functional options wrapper around Command.
WithArgs sets the command arguments.
WithDir sets the command directory.
WithEnv sets the command environment variables.
func WithEnvPassthrough() Opt
WithEnvPassthrough passes the current process environment to the command.
WithUI takes a UI and configures the cmd's STDERR, STDIN, and STDOUT
to use the UI's outputs.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.