Discover Packages
github.com/holos-run/holos
internal
util
package
Version:
v0.93.4
Opens a new window with list of versions in this module.
Published: Sep 12, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
EnsureNewline adds a trailing newline if not already there.
Remove cleans up path, useful for temporary directories.
RunInteractiveCmd runs a command within a context but allows the command to
accept stdin interactively from the user. The caller is expected to handle
errors.
runResult holds the stdout and stderr of a command.
RunCmd runs a command within a context, captures its output, provides debug
logging, and returns the result.
Example:
result, err := RunCmd(ctx, "echo", "hello")
if err != nil {
return wrapper.Wrap(err)
}
fmt.Println(result.Stdout.String())
Output:
"hello\n"
Source Files
¶
Click to show internal directories.
Click to hide internal directories.