Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdSpec ¶
type CmdSpec struct { // Regular expression to match against the " "-joined command Match string // Stdout to return from the command Stdout string }
CmdSpec specifies a command for the fake Commander
type Commander ¶
type Commander struct {
// contains filtered or unexported fields
}
Commander records the commands instead of executing them. It also provides stdout based on a table of (cmd_regexp, stdout) pairs. The regexp is matched against the command and its arguments joined with " ".
func NewCommander ¶
NewCommander creates a new Commander. If rec is nil, all the commands will not be recorded
func (*Commander) ReplaceTempPath ¶
ReplaceTempPath makes the commander replace the path with specified suffix with the specified string. The replacement is done on the word boundary.
Click to show internal directories.
Click to hide internal directories.