utils

package
v0.0.0-...-6d71db8 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(path string) error

CreateDir creates the directory if it not alerady exist.

func Exec

func Exec(
	stdout, stderr io.Writer,
	dir string,
	name string,
	arg []string,
	env []string) (*exec.Cmd, error)

Exec creates a process in background and return the PID of it

func FmtVer

func FmtVer(ver string) (string, error)

FmtVer converts a version string to SemVer format, if the string is not a valid SemVer and fails to parse and convert it, an error is raised.

func IsExist

func IsExist(path string) bool

IsExist check whether a path is exist

func IsNotExist

func IsNotExist(path string) bool

IsNotExist check whether a path is not exist

func MustDir

func MustDir(path string) string

MustDir makes sure dir exists and return the path name

func Untar

func Untar(file, to string) error

Untar decompresses the tarball

Types

This section is empty.

Jump to

Keyboard shortcuts

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