util

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommandOutput added in v1.1.0

func GetCommandOutput(executable string, argument []string, dir string) string

GetCommandOutput is a helper function that runs system commands and returns their output as string

func Log

func Log(message string)

Log prints a default log message.

func LogDebug

func LogDebug(message string)

LogDebug prints a debug-level log message.

func LogError

func LogError(message string)

LogError prints an error-level log message.

func LogImportant

func LogImportant(message string)

LogImportant prints an important-level log message.

func LogNotice added in v1.1.1

func LogNotice(message string)

LogNote prints a slightly elevated log message.

func LogRaw

func LogRaw(message string)

LogRaw prints a non-colored log message.

func LogSeparator

func LogSeparator()

LogSeparator prints a visual separator.

func RunAsyncCommand

func RunAsyncCommand(executable string, argument []string, dir string, wg *sync.WaitGroup)

RunAsyncCommand is meant for execution as a goroutine and requires a WaitGroup. It also does not print directly to stdout, but does so only when the command has terminated.

func RunAsyncCommandWithEnvironment

func RunAsyncCommandWithEnvironment(executable string, argument []string, dir string, wg *sync.WaitGroup, env []string)

RunAsyncCommandWithEnvironment adds functionality for specifying the environment of a process to be run. This enables commands like `FOO=BAR mybinary`.

func RunCommand

func RunCommand(executable string, argument []string, dir string)

RunCommand is a helper function that runs system commands and prints their output to stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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