Documentation ¶
Index ¶
- func CreateTarFromSrc(source string, dest string) error
- 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 Tar(source string) (io.ReadCloser, error)
- func TarChrootToFilesystem(source string, tarball *os.File) error
- func TarToFilesystem(source string, tarball *os.File) error
- func TarWithChroot(source string) (io.ReadCloser, error)
- func UntarToFileSystem(dest string, tarball *os.File, options *archive.TarOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTarFromSrc ¶
Creates a new tar file and writes bytes from io.ReadCloser
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 Tar ¶
func Tar(source string) (io.ReadCloser, error)
Tar creates a tarball from source and returns a readcloser of it
func TarChrootToFilesystem ¶
TarChrootToFilesystem creates a tarball from source and writes to an os.file provided while chrooted to the source.
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.
func UntarToFileSystem ¶
UntarToFileSystem untars an os.file of a tarball to a destination in the filesystem
Types ¶
This section is empty.