utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchCommandOutput

func FetchCommandOutput(command string) string

FetchCommandOutput run command and returns the combined stderr and stdout output.

func FindOrInstallGoBasedProvider

func FindOrInstallGoBasedProvider(pPath, provider, module, version string) (string, error)

FindOrInstallGoBasedProvider check if the provider specified by the pPath executable exists or not. If it exists, it returns the path with no error and if not, it uses the `go install` capabilities to install the provider and setup the required binaries to perform the tests. In case if the install is done by this helper, it will return the value for installed binary as provider which can then be set in the in the invoker to make sure the right path is used for the binaries while invoking rest of the workfow after this helper is triggered.

func RunCommand

func RunCommand(command string) *exec.Proc

RunCommand run command and returns an *exec.Proc with information about the executed process.

func RunCommandWithSeperatedOutput added in v0.4.0

func RunCommandWithSeperatedOutput(command string, stdout, stderr io.Writer) error

RunCommandWithSeperatedOutput run command and returns the results to the provided stdout and stderr io.Writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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