Documentation
¶
Index ¶
- type Command
- func (c *Command) AddEnv(key string, value string)
- func (c *Command) Execute() error
- func (c *Command) Executed() bool
- func (c *Command) ExitCode() int
- func (c *Command) SetTimeout(timeout string) error
- func (c *Command) SetTimeoutMS(ms int)
- func (c *Command) Stderr() string
- func (c *Command) Stdout() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Cmd string
Env []string
Dir string
Timeout time.Duration
// contains filtered or unexported fields
}
Command represents a single command which can be executed
func (*Command) Execute ¶
Execute executes the command and writes the results into it's own instance The results can be received with the Stdout(), Stderr() and ExitCode() methods
func (*Command) SetTimeout ¶ added in v1.0.0
SetTimeout sets the timeout given a time unit Example: SetTimeout("100s") sets the timeout to 100 seconds
func (*Command) SetTimeoutMS ¶
SetTimeoutMS sets the timeout in milliseconds
Click to show internal directories.
Click to hide internal directories.