Documentation ¶
Index ¶
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func DockerVersion(host string, port string) (string, error)
- func Download(filepath string, url string) (err error)
- func EnsureFile(fullpath string) error
- func EnsurerDir(dir string) (err error)
- func GetCurrentExecPath() (scriptPath string)
- func GetHostIP() (net.IP, error)
- func GetLangFromFileName(fileName string) (lang string)
- func IsPathExists(path string) (bool, error)
- func OutputJSON(v interface{}) error
- func PairsToParams(pairs []string) map[string]string
- func RunWithRetry(f func() error, interval time.Duration, maxRetries int) (err error)
- func TarDir(dir string, tarFileName string) error
- func Unzip(source string, target string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func DockerVersion ¶
DockerVersion docker verion
func GetCurrentExecPath ¶
func GetCurrentExecPath() (scriptPath string)
GetCurrentExecPath parses a path from running executable/go file
func GetLangFromFileName ¶
GetLangFromFileName get programming language from file name extension
func IsPathExists ¶
IsPathExists checks whether a path exists or if failed to check
func PairsToParams ¶
PairsToParams make "a=1, b=2" to be {"a": "1", "b": "2"}
func RunWithRetry ¶
RunWithRetry run a closure and retry for times when it fails
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.