Documentation
¶
Overview ¶
Example (RunCommand) ¶
Example_runCommand tests the output when running a command in debug
// Temp directory for logging logTmp, _ := ioutil.TempDir("", "gorilla-installer_test") // Setup a testing Configuration struct with debug mode cfgVerbose := config.Configuration{ Debug: true, Verbose: true, AppDataPath: logTmp, } // Start gorillalog in debug mode gorillalog.NewLog(cfgVerbose) // Override execCommand with our fake version execCommand = fakeExecCommand defer func() { execCommand = origExec }() // Set up what we expect testCmd := "Command Test!" testArgs := []string{"arg1", "arg2"} // Run the function runCommand(testCmd, testArgs)
Output: command: Command Test! [arg1 arg2] Command Output: -------------------- [Command Test! arg1 arg2] --------------------
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.