Documentation
¶
Index ¶
- func ExecCmd(name string, args ...string) (string, error)
- func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, env []string, name string, ...) error
- func GetRandomPort() (int, error)
- func GuardedRemoveAll(path string) error
- func ProgressBar(prefix string, size int64, onComplete string) (*mpb.Progress, *mpb.Bar)
- func RemoveFilesExcept(path string, excludeFile string) error
- func Tar(source string) (io.ReadCloser, error)
- func TarToFilesystem(source string, tarball *os.File) error
- func TarWithChroot(source string) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecCmd ¶
ExecCmd executes a command with args and returns its output as a string along with an error, if any.
func ExecCmdWithStdStreams ¶
func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, env []string, name string, args ...string) error
ExecCmdWithStdStreams execute a command with the specified standard streams.
func GuardedRemoveAll ¶
GuardedRemoveAll functions much like os.RemoveAll but will not delete certain catastrophic paths.
func ProgressBar ¶
func RemoveFilesExcept ¶ added in v5.5.0
RemoveFilesExcept removes all files in a directory except for the one specified by excludeFile and will not delete certain catastrophic paths.
func Tar ¶
func Tar(source string) (io.ReadCloser, error)
Tar creates a tarball from source and returns a readcloser of it
func TarToFilesystem ¶
TarToFilesystem creates a tarball from source and writes to an os.file provided
func TarWithChroot ¶
func TarWithChroot(source string) (io.ReadCloser, error)
TarWithChroot creates a tarball from source and returns a readcloser of it while chrooted to the source.
Types ¶
This section is empty.