common

package
v0.0.0-...-75db7dd Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirNotExists

func CheckDirNotExists(dir string) bool

CheckDirNotExists returns true if a given path doesn't exist, or is not a directory.

func CreateTarball

func CreateTarball(source string, destination string) (string, io.ReadCloser, io.ReadCloser, error)

CreateTarball takes a source and destination. A string will be returned denoting the path the tarball should be copied to for the target container. The first ReadCloser is opened on the source path, the second represents the tarball in memory.

func ExtractDateAndOutput

func ExtractDateAndOutput(s string) (string, string, error)

ExtractDateAndOutput takes a log line from a Docker container and extracts the RFC3339 timestamp and log message.

func Unzip

func Unzip(src, dest string) (string, error)

Unzip a zip archive to dest. Return the first directory unzipped, because in the case of a zip archive downloaded from Github, that will always be the root of the repository. Based on code by "swtdrgn" from http://stackoverflow.com/a/24430720

Types

This section is empty.

Jump to

Keyboard shortcuts

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