installer

package
v1.0.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

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

func Install

func Install(item catalog.Item, installerType, urlPackages, cachePath string) string

Install determines if action needs to be taken on a item and then calls the appropriate function to install or uninstall

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL