commandhelper

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAndExportOutput

func RunAndExportOutput(cmd command.Model, destinationPath, envKey string, lines int) error

RunAndExportOutput runs a command and captures it's output to a file. The genereated output file will be exported to the envKey environment variable. The last N lines of the output if loged with some description.

func RunAndExportOutputWithReturningLastNLines

func RunAndExportOutputWithReturningLastNLines(cmd command.Model, destinationPath, envKey string, lines int) (string, error, error)

RunAndExportOutputWithReturningLastNLines runs a command and captures it's output to a file. The genereated output file will be exported to the envKey environment variable. It returns the last N lines of the output, the error of the command and if any error happened during exporting the output file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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